> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/documentation/api-reference-alpha/reference/executions.md).

# Executions

## GET /api/v1/executions/nestings

> Retrieves an execution with its children.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/executions/nestings":{"get":{"description":"Retrieves an execution with its children.","tags":["Executions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":false,"description":"A UUID v4 string that identifies an entity.","name":"chatMessageId","in":"query"},{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":false,"description":"A UUID v4 string that identifies an entity.","name":"executionId","in":"query"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves an execution with its children.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."},"children":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."},"children":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."},"children":{"type":"array","items":{"nullable":true},"description":"The nested child executions associated with this execution node."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId","children"]},"description":"The nested children associated with this execution node."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId","children"]},"description":"The direct children associated with this execution node."},"costEstimation":{"type":"object","nullable":true,"properties":{"estimatedTotalCostUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["N/A"]}],"description":"The estimated total execution cost in USD."},"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The aggregated input token count for the inspected execution."},"iterations":{"type":"array","items":{"type":"object","properties":{"estimatedCostUsd":{"anyOf":[{"type":"number","minimum":0},{"type":"string","enum":["N/A"]}],"description":"The estimated cost in USD for this LLM usage."},"eventId":{"type":"string","description":"The event identifier that recorded this LLM usage."},"eventType":{"type":"string","enum":["iteration","tool-call","workflow-node"],"description":"The event type that recorded this LLM usage."},"executionId":{"type":"string","description":"The execution identifier that recorded this LLM usage."},"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count for this LLM usage."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label of the event that recorded this LLM usage."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count for this LLM usage."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["estimatedCostUsd","eventId","eventType","executionId","inputTokens","label","model","outputTokens","provider"]},"description":"The custom-provider LLM usages that compose this estimate."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The aggregated output token count for the inspected execution."}},"required":["estimatedTotalCostUsd","inputTokens","iterations","outputTokens"],"description":"The custom-provider cost estimation for the inspected execution."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId","children","costEstimation"]}}}},"400":{"description":"At least one of executionId or chatMessageId must be provided.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Execution not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"412":{"description":"The chat message is a follow-up response without executions; use the trigger chat message.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## GET /api/v1/executions/{id}

> Retrieves an execution.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/executions/{id}":{"get":{"description":"Retrieves an execution.","tags":["Executions"],"parameters":[{"schema":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"required":true,"description":"A UUID v4 string that identifies an entity.","name":"id","in":"path"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves an execution.","content":{"application/json":{"schema":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId"]}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}},"404":{"description":"Execution not found.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```

## GET /api/v1/executions

> Retrieves multiple executions.

```json
{"openapi":"3.1.0","info":{"title":"Public API","version":"1.0.0"},"servers":[{"description":"API Server","url":"https://api.endless.zaia.app"}],"paths":{"/api/v1/executions":{"get":{"description":"Retrieves multiple executions.","tags":["Executions"],"parameters":[{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number."},"required":false,"description":"The page number.","name":"pageNumber","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":10,"description":"The page size."},"required":false,"description":"The page size.","name":"pageSize","in":"query"},{"schema":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}},{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."}],"default":[]},"required":false,"name":"responderIds","in":"query"},{"schema":{"type":"string","description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page."},"required":true,"description":"The API key to use for authentication. Can be created in the api keys section on the workspace settings page.","name":"authorization","in":"header"}],"responses":{"200":{"description":"Retrieves all executions for the workspace.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid","description":"A UUID v4 string that identifies an entity."},"updatedAt":{"type":"string","format":"date-time"},"creditsUsed":{"type":"number","minimum":0,"description":"The total number of credits used by this execution."},"detail":{"anyOf":[{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this agent execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this agent execution."},"type":{"type":"string","enum":["agent-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"agentId":{"type":"string","description":"The agent identifier."},"events":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"llm":{"type":"string","description":"The model key used during the iteration event."},"llmProvider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with the iteration event."},"type":{"type":"string","enum":["iteration"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","llm","llmProvider","type"]},{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"toolType":{"type":"string","description":"The type of tool called."},"type":{"type":"string","enum":["tool-call"],"description":"The event subtype represented by this payload."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","toolType","type"]}]},"description":"The events that occurred during this squad execution."},"origin":{"anyOf":[{"type":"object","properties":{"apiKeyId":{"type":"string","description":"The API key identifier."},"type":{"type":"string","enum":["api"],"description":"The execution origin subtype represented by this payload."}},"required":["apiKeyId","type"]},{"type":"object","properties":{"chatMessageId":{"type":"string","description":"The chat message identifier."},"retryOfExecutionId":{"type":"string","description":"The execution identifier of the prior retry attempt."},"type":{"type":"string","enum":["chat-message"],"description":"The execution origin subtype represented by this payload."}},"required":["chatMessageId","type"]},{"type":"object","properties":{"agentId":{"type":"string","description":"The agent identifier."},"type":{"type":"string","enum":["delegation"],"description":"The execution origin subtype represented by this payload."}},"required":["agentId","type"]},{"type":"object","properties":{"type":{"type":"string","enum":["agentic-execution-node"],"description":"The execution origin subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["type","workflowNodeId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this squad execution."},"squadId":{"type":"string","description":"The squad identifier."},"type":{"type":"string","enum":["squad-execution"],"description":"The execution detail subtype represented by this payload."}},"required":["input","output","agentId","events","origin","squadId","type"]},{"type":"object","properties":{"input":{"type":"object","additionalProperties":{"nullable":true},"description":"The input data for this execution."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this execution."},"events":{"type":"array","items":{"type":"object","properties":{"creditsUsed":{"type":"number","minimum":0,"description":"The number of credits used by this event."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this event ended."},"id":{"type":"string","description":"The event identifier."},"input":{"anyOf":[{"nullable":true},{"type":"object","properties":{}}],"description":"The input data for this event."},"label":{"type":"string","minLength":3,"maxLength":50,"description":"The label for this event."},"llmUsages":{"type":"array","items":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The input token count reported by the LLM provider."},"model":{"type":"string","description":"The model key used for this LLM usage."},"outputTokens":{"type":"integer","nullable":true,"minimum":0,"description":"The output token count reported by the LLM provider."},"provider":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"The provider ID associated with the LLM usage, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the LLM usage."}},"required":["id","name"],"description":"The provider metadata associated with this LLM usage."}},"required":["inputTokens","model","outputTokens","provider"]},"description":"The custom-provider LLM usages recorded for this event."},"output":{"type":"object","nullable":true,"additionalProperties":{"nullable":true},"description":"The output data for this event."},"startedAt":{"type":"string","format":"date-time","description":"When this event started."},"status":{"type":"string","enum":["running","completed","failed","skipped"],"description":"The status of the event."},"childExecutionId":{"type":"string","nullable":true,"description":"The child execution identifier."},"nodeType":{"type":"string","description":"The type of workflow node."},"type":{"type":"string","enum":["workflow-node"],"description":"The event subtype represented by this payload."},"workflowNodeId":{"type":"string","description":"The workflow node identifier."}},"required":["creditsUsed","endedAt","id","label","output","startedAt","status","childExecutionId","nodeType","type","workflowNodeId"]},"description":"The events that occurred during this workflow execution."},"origin":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["webhook-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"type":{"type":"string","enum":["agent-tool-request"],"description":"The execution origin subtype represented by this payload."},"workflowTriggerId":{"type":"string","description":"The workflow trigger identifier."}},"required":["type","workflowTriggerId"]},{"type":"object","properties":{"event":{"type":"string","enum":["comment-created"],"description":"The source event type."},"externalEventId":{"type":"string","description":"The external event identifier."},"source":{"type":"string","enum":["instagram"],"description":"The source event provider."},"triggerId":{"type":"string","description":"The trigger identifier."},"type":{"type":"string","enum":["trigger"],"description":"The execution origin subtype represented by this payload."}},"required":["event","externalEventId","source","triggerId","type"]}],"description":"The origin of this workflow execution."},"type":{"type":"string","enum":["workflow-execution"],"description":"The execution detail subtype represented by this payload."},"workflowId":{"type":"string","description":"The workflow identifier."},"workflowImplementationId":{"type":"string","description":"The workflow implementation identifier."}},"required":["input","output","events","origin","type","workflowId","workflowImplementationId"]}],"description":"The execution detail containing type-specific information."},"endedAt":{"type":"string","nullable":true,"format":"date-time","description":"When this execution ended."},"isAgentic":{"type":"boolean","description":"Whether this execution is agentic."},"isFailedAttempt":{"type":"boolean","description":"Whether this execution belongs to a failed retry attempt."},"isPurged":{"type":"boolean","description":"Whether this execution has been purged."},"parentId":{"type":"string","nullable":true,"format":"uuid","description":"The parent execution ID of this execution."},"responderId":{"type":"string","description":"The responder ID of this execution."},"startedAt":{"type":"string","format":"date-time","description":"When this execution started."},"status":{"type":"string","enum":["running","completed","failed","cancelled"],"description":"The status of the execution."},"workspaceId":{"type":"string","description":"The workspace ID of this execution."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isFailedAttempt","isPurged","parentId","responderId","startedAt","status","workspaceId"]}}}}},"401":{"description":"Unauthorized.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The error code."},"cta":{"type":"object","properties":{"type":{"type":"string","enum":["support-contact"]},"url":{"type":"string","format":"uri"}},"required":["type","url"],"description":"The error call-to-action."},"feedback":{"type":"object","properties":{"enUs":{"type":"string"},"esEs":{"type":"string"},"ptBr":{"type":"string"}},"description":"The error feedback."},"message":{"type":"string","description":"The error message."},"name":{"type":"string","description":"The error name."}},"required":["feedback","message","name"],"description":"The description of a known exception."}}}}}}}}}
```
