---
title: "GET /api/v1/executions/nestings"
method: GET
path: "/api/v1/executions/nestings"
tags: ["Executions"]
---

# GET /api/v1/executions/nestings

`GET /api/v1/executions/nestings`

Retrieves an execution with its children.

## Query parameters

- `chatMessageId` string, uuid — A UUID v4 string that identifies an entity.
- `executionId` string, uuid — A UUID v4 string that identifies an entity.

## Headers

- `authorization` string, required — The API key to use for authentication. Can be created in the api keys section on the workspace settings page.

## Response `200`

Retrieves an execution with its children.

- object
  - `createdAt` string, date-time, required
  - `id` string, uuid, required — A UUID v4 string that identifies an entity.
  - `updatedAt` string, date-time, required
  - `creditsUsed` number, required — The total number of credits used by this execution.
  - `detail` union, required — The execution detail containing type-specific information.
    - object
      - `input` object, required — The input data for this execution.
      - `output` object, nullable, required — The output data for this execution.
      - `agentId` string, required — The agent identifier.
      - `events` union[], required — The events that occurred during this agent execution.
        - union
          - object
            - `creditsUsed` number, required — The number of credits used by this event.
            - `endedAt` string, date-time, nullable, required — When this event ended.
            - `id` string, required — The event identifier.
            - `input` union — The input data for this event.
              - …
            - `label` string, required — The label for this event.
            - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
              - …
            - `output` object, nullable, required — The output data for this event.
            - `startedAt` string, date-time, required — When this event started.
            - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
            - `llm` string, required — The model key used during the iteration event.
            - `llmProvider` object, required — The provider metadata associated with the iteration event.
              - …
            - `type` 'iteration', required — The event subtype represented by this payload.
          - object
            - `creditsUsed` number, required — The number of credits used by this event.
            - `endedAt` string, date-time, nullable, required — When this event ended.
            - `id` string, required — The event identifier.
            - `input` union — The input data for this event.
              - …
            - `label` string, required — The label for this event.
            - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
              - …
            - `output` object, nullable, required — The output data for this event.
            - `startedAt` string, date-time, required — When this event started.
            - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
            - `childExecutionId` string, nullable, required — The child execution identifier.
            - `toolType` string, required — The type of tool called.
            - `type` 'tool-call', required — The event subtype represented by this payload.
      - `origin` union, required — The origin of this agent execution.
        - object
          - `apiKeyId` string, required — The API key identifier.
          - `type` 'api', required — The execution origin subtype represented by this payload.
        - object
          - `chatMessageId` string, required — The chat message identifier.
          - `retryOfExecutionId` string — The execution identifier of the prior retry attempt.
          - `type` 'chat-message', required — The execution origin subtype represented by this payload.
        - object
          - `agentId` string, required — The agent identifier.
          - `type` 'delegation', required — The execution origin subtype represented by this payload.
        - object
          - `type` 'agentic-execution-node', required — The execution origin subtype represented by this payload.
          - `workflowNodeId` string, required — The workflow node identifier.
        - object
          - `event` 'comment-created', required — The source event type.
          - `externalEventId` string, required — The external event identifier.
          - `source` 'instagram', required — The source event provider.
          - `triggerId` string, required — The trigger identifier.
          - `type` 'trigger', required — The execution origin subtype represented by this payload.
      - `type` 'agent-execution', required — The execution detail subtype represented by this payload.
    - object
      - `input` object, required — The input data for this execution.
      - `output` object, nullable, required — The output data for this execution.
      - `agentId` string, required — The agent identifier.
      - `events` union[], required — The events that occurred during this squad execution.
        - union
          - object
            - `creditsUsed` number, required — The number of credits used by this event.
            - `endedAt` string, date-time, nullable, required — When this event ended.
            - `id` string, required — The event identifier.
            - `input` union — The input data for this event.
              - …
            - `label` string, required — The label for this event.
            - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
              - …
            - `output` object, nullable, required — The output data for this event.
            - `startedAt` string, date-time, required — When this event started.
            - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
            - `llm` string, required — The model key used during the iteration event.
            - `llmProvider` object, required — The provider metadata associated with the iteration event.
              - …
            - `type` 'iteration', required — The event subtype represented by this payload.
          - object
            - `creditsUsed` number, required — The number of credits used by this event.
            - `endedAt` string, date-time, nullable, required — When this event ended.
            - `id` string, required — The event identifier.
            - `input` union — The input data for this event.
              - …
            - `label` string, required — The label for this event.
            - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
              - …
            - `output` object, nullable, required — The output data for this event.
            - `startedAt` string, date-time, required — When this event started.
            - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
            - `childExecutionId` string, nullable, required — The child execution identifier.
            - `toolType` string, required — The type of tool called.
            - `type` 'tool-call', required — The event subtype represented by this payload.
      - `origin` union, required — The origin of this squad execution.
        - object
          - `apiKeyId` string, required — The API key identifier.
          - `type` 'api', required — The execution origin subtype represented by this payload.
        - object
          - `chatMessageId` string, required — The chat message identifier.
          - `retryOfExecutionId` string — The execution identifier of the prior retry attempt.
          - `type` 'chat-message', required — The execution origin subtype represented by this payload.
        - object
          - `agentId` string, required — The agent identifier.
          - `type` 'delegation', required — The execution origin subtype represented by this payload.
        - object
          - `type` 'agentic-execution-node', required — The execution origin subtype represented by this payload.
          - `workflowNodeId` string, required — The workflow node identifier.
        - object
          - `event` 'comment-created', required — The source event type.
          - `externalEventId` string, required — The external event identifier.
          - `source` 'instagram', required — The source event provider.
          - `triggerId` string, required — The trigger identifier.
          - `type` 'trigger', required — The execution origin subtype represented by this payload.
      - `squadId` string, required — The squad identifier.
      - `type` 'squad-execution', required — The execution detail subtype represented by this payload.
    - object
      - `input` object, required — The input data for this execution.
      - `output` object, nullable, required — The output data for this execution.
      - `events` object[], required — The events that occurred during this workflow execution.
        - `creditsUsed` number, required — The number of credits used by this event.
        - `endedAt` string, date-time, nullable, required — When this event ended.
        - `id` string, required — The event identifier.
        - `input` union — The input data for this event.
          - unknown
          - object
        - `label` string, required — The label for this event.
        - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
          - `inputTokens` integer, nullable, required — The input token count reported by the LLM provider.
          - `model` string, required — The model key used for this LLM usage.
          - `outputTokens` integer, nullable, required — The output token count reported by the LLM provider.
          - `provider` object, required — The provider metadata associated with this LLM usage.
            - `id` string, nullable, required — The provider ID associated with the LLM usage, when one exists.
            - `name` string, required — The display name of the provider associated with the LLM usage.
        - `output` object, nullable, required — The output data for this event.
        - `startedAt` string, date-time, required — When this event started.
        - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
        - `childExecutionId` string, nullable, required — The child execution identifier.
        - `nodeType` string, required — The type of workflow node.
        - `type` 'workflow-node', required — The event subtype represented by this payload.
        - `workflowNodeId` string, required — The workflow node identifier.
      - `origin` union, required — The origin of this workflow execution.
        - object
          - `type` 'webhook-request', required — The execution origin subtype represented by this payload.
          - `workflowTriggerId` string, required — The workflow trigger identifier.
        - object
          - `type` 'agent-tool-request', required — The execution origin subtype represented by this payload.
          - `workflowTriggerId` string, required — The workflow trigger identifier.
        - object
          - `event` 'comment-created', required — The source event type.
          - `externalEventId` string, required — The external event identifier.
          - `source` 'instagram', required — The source event provider.
          - `triggerId` string, required — The trigger identifier.
          - `type` 'trigger', required — The execution origin subtype represented by this payload.
      - `type` 'workflow-execution', required — The execution detail subtype represented by this payload.
      - `workflowId` string, required — The workflow identifier.
      - `workflowImplementationId` string, required — The workflow implementation identifier.
  - `endedAt` string, date-time, nullable, required — When this execution ended.
  - `isAgentic` boolean, required — Whether this execution is agentic.
  - `isFailedAttempt` boolean, required — Whether this execution belongs to a failed retry attempt.
  - `isPurged` boolean, required — Whether this execution has been purged.
  - `parentId` string, uuid, nullable, required — The parent execution ID of this execution.
  - `responderId` string, required — The responder ID of this execution.
  - `startedAt` string, date-time, required — When this execution started.
  - `status` 'running' | 'completed' | 'failed' | 'cancelled', required — The status of the execution.
  - `workspaceId` string, required — The workspace ID of this execution.
  - `children` object[], required — The direct children associated with this execution node.
    - `createdAt` string, date-time, required
    - `id` string, uuid, required — A UUID v4 string that identifies an entity.
    - `updatedAt` string, date-time, required
    - `creditsUsed` number, required — The total number of credits used by this execution.
    - `detail` union, required — The execution detail containing type-specific information.
      - object
        - `input` object, required — The input data for this execution.
        - `output` object, nullable, required — The output data for this execution.
        - `agentId` string, required — The agent identifier.
        - `events` union[], required — The events that occurred during this agent execution.
          - union
            - object
              - …
            - object
              - …
        - `origin` union, required — The origin of this agent execution.
          - object
            - `apiKeyId` string, required — The API key identifier.
            - `type` 'api', required — The execution origin subtype represented by this payload.
          - object
            - `chatMessageId` string, required — The chat message identifier.
            - `retryOfExecutionId` string — The execution identifier of the prior retry attempt.
            - `type` 'chat-message', required — The execution origin subtype represented by this payload.
          - object
            - `agentId` string, required — The agent identifier.
            - `type` 'delegation', required — The execution origin subtype represented by this payload.
          - object
            - `type` 'agentic-execution-node', required — The execution origin subtype represented by this payload.
            - `workflowNodeId` string, required — The workflow node identifier.
          - object
            - `event` 'comment-created', required — The source event type.
            - `externalEventId` string, required — The external event identifier.
            - `source` 'instagram', required — The source event provider.
            - `triggerId` string, required — The trigger identifier.
            - `type` 'trigger', required — The execution origin subtype represented by this payload.
        - `type` 'agent-execution', required — The execution detail subtype represented by this payload.
      - object
        - `input` object, required — The input data for this execution.
        - `output` object, nullable, required — The output data for this execution.
        - `agentId` string, required — The agent identifier.
        - `events` union[], required — The events that occurred during this squad execution.
          - union
            - object
              - …
            - object
              - …
        - `origin` union, required — The origin of this squad execution.
          - object
            - `apiKeyId` string, required — The API key identifier.
            - `type` 'api', required — The execution origin subtype represented by this payload.
          - object
            - `chatMessageId` string, required — The chat message identifier.
            - `retryOfExecutionId` string — The execution identifier of the prior retry attempt.
            - `type` 'chat-message', required — The execution origin subtype represented by this payload.
          - object
            - `agentId` string, required — The agent identifier.
            - `type` 'delegation', required — The execution origin subtype represented by this payload.
          - object
            - `type` 'agentic-execution-node', required — The execution origin subtype represented by this payload.
            - `workflowNodeId` string, required — The workflow node identifier.
          - object
            - `event` 'comment-created', required — The source event type.
            - `externalEventId` string, required — The external event identifier.
            - `source` 'instagram', required — The source event provider.
            - `triggerId` string, required — The trigger identifier.
            - `type` 'trigger', required — The execution origin subtype represented by this payload.
        - `squadId` string, required — The squad identifier.
        - `type` 'squad-execution', required — The execution detail subtype represented by this payload.
      - object
        - `input` object, required — The input data for this execution.
        - `output` object, nullable, required — The output data for this execution.
        - `events` object[], required — The events that occurred during this workflow execution.
          - `creditsUsed` number, required — The number of credits used by this event.
          - `endedAt` string, date-time, nullable, required — When this event ended.
          - `id` string, required — The event identifier.
          - `input` union — The input data for this event.
            - unknown
            - object
          - `label` string, required — The label for this event.
          - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
            - `inputTokens` integer, nullable, required — The input token count reported by the LLM provider.
            - `model` string, required — The model key used for this LLM usage.
            - `outputTokens` integer, nullable, required — The output token count reported by the LLM provider.
            - `provider` object, required — The provider metadata associated with this LLM usage.
              - …
          - `output` object, nullable, required — The output data for this event.
          - `startedAt` string, date-time, required — When this event started.
          - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
          - `childExecutionId` string, nullable, required — The child execution identifier.
          - `nodeType` string, required — The type of workflow node.
          - `type` 'workflow-node', required — The event subtype represented by this payload.
          - `workflowNodeId` string, required — The workflow node identifier.
        - `origin` union, required — The origin of this workflow execution.
          - object
            - `type` 'webhook-request', required — The execution origin subtype represented by this payload.
            - `workflowTriggerId` string, required — The workflow trigger identifier.
          - object
            - `type` 'agent-tool-request', required — The execution origin subtype represented by this payload.
            - `workflowTriggerId` string, required — The workflow trigger identifier.
          - object
            - `event` 'comment-created', required — The source event type.
            - `externalEventId` string, required — The external event identifier.
            - `source` 'instagram', required — The source event provider.
            - `triggerId` string, required — The trigger identifier.
            - `type` 'trigger', required — The execution origin subtype represented by this payload.
        - `type` 'workflow-execution', required — The execution detail subtype represented by this payload.
        - `workflowId` string, required — The workflow identifier.
        - `workflowImplementationId` string, required — The workflow implementation identifier.
    - `endedAt` string, date-time, nullable, required — When this execution ended.
    - `isAgentic` boolean, required — Whether this execution is agentic.
    - `isFailedAttempt` boolean, required — Whether this execution belongs to a failed retry attempt.
    - `isPurged` boolean, required — Whether this execution has been purged.
    - `parentId` string, uuid, nullable, required — The parent execution ID of this execution.
    - `responderId` string, required — The responder ID of this execution.
    - `startedAt` string, date-time, required — When this execution started.
    - `status` 'running' | 'completed' | 'failed' | 'cancelled', required — The status of the execution.
    - `workspaceId` string, required — The workspace ID of this execution.
    - `children` object[], required — The nested children associated with this execution node.
      - `createdAt` string, date-time, required
      - `id` string, uuid, required — A UUID v4 string that identifies an entity.
      - `updatedAt` string, date-time, required
      - `creditsUsed` number, required — The total number of credits used by this execution.
      - `detail` union, required — The execution detail containing type-specific information.
        - object
          - `input` object, required — The input data for this execution.
          - `output` object, nullable, required — The output data for this execution.
          - `agentId` string, required — The agent identifier.
          - `events` union[], required — The events that occurred during this agent execution.
            - union
              - …
          - `origin` union, required — The origin of this agent execution.
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `type` 'agent-execution', required — The execution detail subtype represented by this payload.
        - object
          - `input` object, required — The input data for this execution.
          - `output` object, nullable, required — The output data for this execution.
          - `agentId` string, required — The agent identifier.
          - `events` union[], required — The events that occurred during this squad execution.
            - union
              - …
          - `origin` union, required — The origin of this squad execution.
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
          - `squadId` string, required — The squad identifier.
          - `type` 'squad-execution', required — The execution detail subtype represented by this payload.
        - object
          - `input` object, required — The input data for this execution.
          - `output` object, nullable, required — The output data for this execution.
          - `events` object[], required — The events that occurred during this workflow execution.
            - `creditsUsed` number, required — The number of credits used by this event.
            - `endedAt` string, date-time, nullable, required — When this event ended.
            - `id` string, required — The event identifier.
            - `input` union — The input data for this event.
              - …
            - `label` string, required — The label for this event.
            - `llmUsages` object[] — The custom-provider LLM usages recorded for this event.
              - …
            - `output` object, nullable, required — The output data for this event.
            - `startedAt` string, date-time, required — When this event started.
            - `status` 'running' | 'completed' | 'failed' | 'skipped', required — The status of the event.
            - `childExecutionId` string, nullable, required — The child execution identifier.
            - `nodeType` string, required — The type of workflow node.
            - `type` 'workflow-node', required — The event subtype represented by this payload.
            - `workflowNodeId` string, required — The workflow node identifier.
          - `origin` union, required — The origin of this workflow execution.
            - object
              - …
            - object
              - …
            - object
              - …
          - `type` 'workflow-execution', required — The execution detail subtype represented by this payload.
          - `workflowId` string, required — The workflow identifier.
          - `workflowImplementationId` string, required — The workflow implementation identifier.
      - `endedAt` string, date-time, nullable, required — When this execution ended.
      - `isAgentic` boolean, required — Whether this execution is agentic.
      - `isFailedAttempt` boolean, required — Whether this execution belongs to a failed retry attempt.
      - `isPurged` boolean, required — Whether this execution has been purged.
      - `parentId` string, uuid, nullable, required — The parent execution ID of this execution.
      - `responderId` string, required — The responder ID of this execution.
      - `startedAt` string, date-time, required — When this execution started.
      - `status` 'running' | 'completed' | 'failed' | 'cancelled', required — The status of the execution.
      - `workspaceId` string, required — The workspace ID of this execution.
      - `children` unknown[], required — The nested child executions associated with this execution node.
        - unknown
  - `costEstimation` object, nullable, required — The custom-provider cost estimation for the inspected execution.
    - `estimatedTotalCostUsd` union, required — The estimated total execution cost in USD.
      - number
      - 'N/A'
    - `inputTokens` integer, nullable, required — The aggregated input token count for the inspected execution.
    - `iterations` object[], required — The custom-provider LLM usages that compose this estimate.
      - `estimatedCostUsd` union, required — The estimated cost in USD for this LLM usage.
        - number
        - 'N/A'
      - `eventId` string, required — The event identifier that recorded this LLM usage.
      - `eventType` 'iteration' | 'tool-call' | 'workflow-node', required — The event type that recorded this LLM usage.
      - `executionId` string, required — The execution identifier that recorded this LLM usage.
      - `inputTokens` integer, nullable, required — The input token count for this LLM usage.
      - `label` string, required — The label of the event that recorded this LLM usage.
      - `model` string, required — The model key used for this LLM usage.
      - `outputTokens` integer, nullable, required — The output token count for this LLM usage.
      - `provider` object, required — The provider metadata associated with this LLM usage.
        - `id` string, nullable, required — The provider ID associated with the LLM usage, when one exists.
        - `name` string, required — The display name of the provider associated with the LLM usage.
    - `outputTokens` integer, nullable, required — The aggregated output token count for the inspected execution.

## Other responses

- `400` — At least one of executionId or chatMessageId must be provided.
- `401` — Unauthorized.
- `404` — Execution not found.
- `412` — The chat message is a follow-up response without executions; use the trigger chat message.

---

[API](https://skmtc.dev/zaia/apis/public-api.md) · [All operations](https://skmtc.dev/zaia/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zaia/public-api/revisions/58da3b2ba49f/schema)
