> 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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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"]}],"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."},"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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"]}],"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."},"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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"]}],"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."},"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","isPurged","parentId","responderId","startedAt","status","workspaceId","children"]},"description":"The nested children associated with this execution node."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isPurged","parentId","responderId","startedAt","status","workspaceId","children"]},"description":"The direct children associated with this execution node."}},"required":["createdAt","id","updatedAt","creditsUsed","detail","endedAt","isAgentic","isPurged","parentId","responderId","startedAt","status","workspaceId","children"]}}}},"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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"]}],"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."},"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","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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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 iteration event, when one exists."},"name":{"type":"string","minLength":3,"maxLength":50,"description":"The display name of the provider associated with the iteration event."}},"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."},"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"],"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."},"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"]}],"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."},"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"],"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"]}],"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."},"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","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."}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/documentation/api-reference-alpha/reference/executions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
