{"components":{"schemas":{"Notifications.V2.ActionCompletedPayload":{"description":"Payload for EXECUTION_ACTION_COMPLETED events","properties":{"action_id":{"type":"string"},"action_name":{"description":"Name/type of the action that was executed (e.g., playwright_script, iris)","type":"string"},"duration":{"description":"Execution duration in milliseconds","format":"int64","type":"integer"},"output":{"description":"Output data from the action execution (contains result, success, console_logs, etc.)","type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"},"step_number":{"type":"integer"}},"required":["action_name","output","step_number","action_id"],"title":"EXECUTION_ACTION_COMPLETED","type":"object"},"Notifications.V2.ActionFailedPayload":{"description":"Payload for EXECUTION_ACTION_FAILED events","properties":{"action_id":{"type":"string"},"action_name":{"type":"string"},"duration":{"description":"Execution duration in milliseconds","format":"int64","type":"integer"},"failure":{"type":"string"},"os_error":{"properties":{"message":{"type":"string"}},"required":["message"],"type":"object"},"step_number":{"type":"integer"}},"required":["action_name","failure","step_number","action_id"],"title":"EXECUTION_ACTION_FAILED","type":"object"},"Notifications.V2.ActionStartedPayload":{"description":"Payload for EXECUTION_ACTION_STARTED events","properties":{"action_id":{"type":"string"},"action_name":{"type":"string"},"arguments":{"type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"},"step_number":{"type":"integer"}},"required":["action_name","arguments","step_number","action_id"],"title":"EXECUTION_ACTION_STARTED","type":"object"},"Notifications.V2.AwaitingConfirmationPayload":{"description":"Payload for EXECUTION_AWAITING_CONFIRMATION events","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"EXECUTION_AWAITING_CONFIRMATION","type":"object"},"Notifications.V2.CancelledPayload":{"description":"Payload for EXECUTION_CANCELLED events","properties":{"cancelled_by":{"description":"Who cancelled the execution (user, system, etc.)","type":"string"},"reason":{"type":"string"}},"required":["reason","cancelled_by"],"title":"EXECUTION_CANCELLED","type":"object"},"Notifications.V2.Category":{"description":"Category of the notification event","enum":["execution"],"type":"string"},"Notifications.V2.CompletedPayload":{"description":"Payload for EXECUTION_COMPLETED events","properties":{"outcome":{"type":"string"},"reasoning":{"type":"string"},"result":{"type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"}},"required":["result","reasoning","outcome"],"title":"EXECUTION_COMPLETED","type":"object"},"Notifications.V2.CustomEventFile":{"description":"A file the workflow attached to a custom event","properties":{"file_id":{"type":"string"},"file_name":{"type":"string"},"file_size":{"description":"File size in bytes","format":"int64","type":"integer"},"mime_type":{"description":"MIME type, from the file extension","type":"string"},"presigned_url":{"description":"Signed URL to download the file. Valid for one hour from when the event was emitted.","type":"string"}},"required":["file_id","file_name","mime_type","file_size","presigned_url"],"type":"object"},"Notifications.V2.CustomEventPayload":{"description":"Payload for EXECUTION_CUSTOM_EVENT events","properties":{"files":{"description":"Files the workflow attached. Absent when it attached none.","items":{"$ref":"#/components/schemas/Notifications.V2.CustomEventFile"},"type":"array","x-typespec-name":"Notifications.V2.CustomEventFile[]"},"id":{"description":"Identifier of this emit. It is the same each time this event is delivered, so use it to drop duplicates.","type":"string"},"name":{"description":"Event name chosen by the workflow, for example 'referral_result'","type":"string"},"payload":{"description":"Data chosen by the workflow","type":"object","unevaluatedProperties":{},"x-typespec-name":"Record\u003cunknown\u003e"},"text":{"description":"Short human-readable summary, when the workflow gave one","type":"string"}},"required":["id","name"],"title":"EXECUTION_CUSTOM_EVENT","type":"object"},"Notifications.V2.EmptyPayload":{"description":"Empty payload for events with no additional data","title":"EXECUTION_STARTED","type":"object"},"Notifications.V2.ExecutionBatchCompletedPayload":{"description":"Payload for EXECUTION_BATCH_COMPLETED events","properties":{"cancelled_count":{"type":"integer"},"triggered_count":{"description":"Number of executions that were triggered","type":"integer"}},"required":["triggered_count","cancelled_count"],"title":"EXECUTION_BATCH_COMPLETED","type":"object"},"Notifications.V2.ExecutionBatchEvent":{"description":"Execution batch event types.","enum":["EXECUTION_BATCH_STARTED","EXECUTION_BATCH_COMPLETED"],"type":"string"},"Notifications.V2.ExecutionBatchInfo":{"description":"Batch information with event-specific payload","properties":{"agent_id":{"deprecated":true,"description":"Deprecated: use workflow_id. Workflow identifier","type":"string"},"agent_name":{"deprecated":true,"description":"Deprecated: use workflow_name. Workflow name","type":"string"},"batch_id":{"type":"string"},"batch_name":{"type":"string"},"batch_url":{"description":"URL to view the batch in the Asteroid platform","type":"string"},"event":{"$ref":"#/components/schemas/Notifications.V2.ExecutionBatchEvent"},"payload":{"anyOf":[{"$ref":"#/components/schemas/Notifications.V2.ExecutionBatchStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ExecutionBatchCompletedPayload"}],"description":"Event-specific payload data. The structure depends on the 'event' field."},"workflow_id":{"type":"string"},"workflow_name":{"type":"string"}},"required":["event","batch_id","batch_name","batch_url","workflow_id","workflow_name","agent_id","agent_name","payload"],"type":"object"},"Notifications.V2.ExecutionBatchNotificationV2":{"description":"Top-level V2 notification structure sent to webhook endpoints for execution batch events","properties":{"event_id":{"description":"Unique identifier for this notification event. Stable across redeliveries of the same event.","type":"string"},"info":{"$ref":"#/components/schemas/Notifications.V2.ExecutionBatchInfo"},"timestamp":{"format":"date-time","type":"string"},"type":{"description":"The category of the notification. Always 'execution_batch' for batch events.","enum":["execution_batch"],"type":"string"}},"required":["type","event_id","timestamp","info"],"type":"object"},"Notifications.V2.ExecutionBatchStartedPayload":{"description":"Payload for EXECUTION_BATCH_STARTED events","properties":{"item_count":{"type":"integer"}},"required":["item_count"],"title":"EXECUTION_BATCH_STARTED","type":"object"},"Notifications.V2.ExecutionEvent":{"description":"Execution event types","enum":["EXECUTION_STARTED","EXECUTION_COMPLETED","EXECUTION_FAILED","EXECUTION_CANCELLED","EXECUTION_PAUSED","EXECUTION_RESUMED","EXECUTION_AWAITING_CONFIRMATION","EXECUTION_ACTION_STARTED","EXECUTION_ACTION_COMPLETED","EXECUTION_ACTION_FAILED","EXECUTION_STEP_STARTED","EXECUTION_STEP_PROCESSED","EXECUTION_MESSAGE_ADDED","USER_MESSAGE_RECEIVED","EXECUTION_REASONING_ADDED","EXECUTION_TRANSITIONED","EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED","EXECUTION_FILE_ADDED","EXECUTION_CUSTOM_EVENT","EXECUTION_TEST"],"type":"string"},"Notifications.V2.ExecutionInfo":{"description":"Execution information with event-specific payload","properties":{"agent_id":{"deprecated":true,"description":"Deprecated: use workflow_id. Workflow identifier","type":"string"},"agent_name":{"deprecated":true,"description":"Deprecated: use workflow_name. Workflow name","type":"string"},"event":{"$ref":"#/components/schemas/Notifications.V2.ExecutionEvent"},"execution_id":{"type":"string"},"execution_url":{"description":"URL to view the execution in the Asteroid platform","type":"string"},"metadata":{"description":"Execution metadata key-value pairs, as provided when the execution was created","type":"object","unevaluatedProperties":{"type":"string"},"x-typespec-name":"Record\u003cstring\u003e"},"payload":{"anyOf":[{"$ref":"#/components/schemas/Notifications.V2.EmptyPayload"},{"$ref":"#/components/schemas/Notifications.V2.CompletedPayload"},{"$ref":"#/components/schemas/Notifications.V2.FailedPayload"},{"$ref":"#/components/schemas/Notifications.V2.CancelledPayload"},{"$ref":"#/components/schemas/Notifications.V2.PausedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ResumedPayload"},{"$ref":"#/components/schemas/Notifications.V2.AwaitingConfirmationPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionCompletedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ActionFailedPayload"},{"$ref":"#/components/schemas/Notifications.V2.StepStartedPayload"},{"$ref":"#/components/schemas/Notifications.V2.StepProcessedPayload"},{"$ref":"#/components/schemas/Notifications.V2.MessageAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.UserMessageReceivedPayload"},{"$ref":"#/components/schemas/Notifications.V2.ReasoningAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.TransitionedPayload"},{"$ref":"#/components/schemas/Notifications.V2.PlaywrightScriptGeneratedPayload"},{"$ref":"#/components/schemas/Notifications.V2.FileAddedPayload"},{"$ref":"#/components/schemas/Notifications.V2.CustomEventPayload"},{"$ref":"#/components/schemas/Notifications.V2.TestPayload"}],"description":"Event-specific payload data. The structure depends on the 'event' field."},"workflow_id":{"type":"string"},"workflow_name":{"type":"string"}},"required":["event","execution_id","execution_url","workflow_id","workflow_name","agent_id","agent_name","payload"],"type":"object"},"Notifications.V2.FailedPayload":{"description":"Payload for EXECUTION_FAILED events","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"EXECUTION_FAILED","type":"object"},"Notifications.V2.FileAddedPayload":{"description":"Payload for EXECUTION_FILE_ADDED events","properties":{"file_id":{"type":"string"},"file_name":{"type":"string"},"file_size":{"description":"File size in bytes","type":"integer"},"mime_type":{"type":"string"},"presigned_url":{"description":"Presigned URL to access the file","type":"string"},"source":{"description":"Source of the file (upload, download, or agent)","type":"string"}},"required":["file_id","file_name","mime_type","file_size","source","presigned_url"],"title":"EXECUTION_FILE_ADDED","type":"object"},"Notifications.V2.MessageAddedPayload":{"description":"Payload for EXECUTION_MESSAGE_ADDED events","properties":{"message":{"type":"string"}},"required":["message"],"title":"EXECUTION_MESSAGE_ADDED","type":"object"},"Notifications.V2.NotificationV2":{"description":"Top-level V2 notification structure sent to webhook endpoints","properties":{"event_id":{"type":"string"},"info":{"$ref":"#/components/schemas/Notifications.V2.ExecutionInfo"},"timestamp":{"format":"date-time","type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/Notifications.V2.Category"}],"description":"The category of the notification. Execution batch events use ExecutionBatchNotificationV2 instead."}},"required":["type","event_id","timestamp","info"],"type":"object"},"Notifications.V2.PausedPayload":{"description":"Payload for EXECUTION_PAUSED events","properties":{"paused_by":{"description":"Who paused the execution (user, agent, system)","type":"string"},"reason":{"description":"Reason for the pause. For user pauses: \"paused by user\". For agent pauses: the query/message sent via send_user_message.","type":"string"}},"required":["reason","paused_by"],"title":"EXECUTION_PAUSED","type":"object"},"Notifications.V2.PlaywrightScriptGeneratedPayload":{"description":"Payload for EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED events","properties":{"context":{"type":"string"},"generated_at":{"format":"date-time","type":"string"},"node_id":{"type":"string"},"node_name":{"type":"string"},"script":{"type":"string"}},"required":["node_id","node_name","script","context","generated_at"],"title":"EXECUTION_PLAYWRIGHT_SCRIPT_GENERATED","type":"object"},"Notifications.V2.ReasoningAddedPayload":{"description":"Payload for EXECUTION_REASONING_ADDED events","properties":{"reasoning":{"type":"string"}},"required":["reasoning"],"title":"EXECUTION_REASONING_ADDED","type":"object"},"Notifications.V2.ResumedPayload":{"description":"Payload for EXECUTION_RESUMED events","properties":{"reason":{"type":"string"}},"required":["reason"],"title":"EXECUTION_RESUMED","type":"object"},"Notifications.V2.StepProcessedPayload":{"description":"Payload for EXECUTION_STEP_PROCESSED events","properties":{"step":{"type":"integer"}},"required":["step"],"title":"EXECUTION_STEP_PROCESSED","type":"object"},"Notifications.V2.StepStartedPayload":{"description":"Payload for EXECUTION_STEP_STARTED events","properties":{"step":{"type":"integer"}},"required":["step"],"title":"EXECUTION_STEP_STARTED","type":"object"},"Notifications.V2.TestPayload":{"description":"Payload for EXECUTION_TEST events","properties":{"message":{"type":"string"}},"required":["message"],"title":"EXECUTION_TEST","type":"object"},"Notifications.V2.TransitionedPayload":{"description":"Payload for EXECUTION_TRANSITIONED events","properties":{"from_node_duration":{"description":"Duration spent in previous node (seconds)","type":"integer"},"to_node":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"],"type":"object"},"transition_type":{"type":"string"}},"required":["to_node"],"title":"EXECUTION_TRANSITIONED","type":"object"},"Notifications.V2.UserMessageReceivedPayload":{"description":"Payload for USER_MESSAGE_RECEIVED events","properties":{"execution_was":{"description":"Execution state when message was received (running, paused, paused_by_agent)","type":"string"},"injected_into":{"description":"Where the message was injected (execution_state, database_only)","type":"string"},"message":{"type":"string"},"user_id":{"type":"string"}},"required":["user_id","message","execution_was","injected_into"],"title":"USER_MESSAGE_RECEIVED","type":"object"}}},"info":{"title":"Asteroid Webhook Notifications","version":"0.0.0"},"openapi":"3.1.0","paths":{"/webhooks/example":{"post":{"description":"Example endpoint to expose the webhook notification schema. This operation is for documentation purposes only.","operationId":"WebhookSchemas_exampleWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notifications.V2.NotificationV2"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "}},"summary":"Webhook Notification Payload"}},"/webhooks/example-batch":{"post":{"description":"Example endpoint to expose the execution batch webhook notification schema. This operation is for documentation purposes only.","operationId":"WebhookSchemas_exampleBatchWebhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notifications.V2.ExecutionBatchNotificationV2"}}},"required":true},"responses":{"204":{"description":"There is no content to send for this request, but the headers may be useful. "}},"summary":"Batch Webhook Notification Payload"}}}}
