> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fact0.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingest spans for an execution



## OpenAPI

````yaml /openapi/telemetry.v1.yaml post /api/v1/executions/{executionID}/spans
openapi: 3.1.0
info:
  title: Fact0 Execution Telemetry API
  version: 1.0.0
  description: >
    Execution tracing API for AI agent observability - executions, spans,
    events, DAG, and replay.


    **Auth:** `f0_live_*` API keys (same as the audit log on Fact0 Cloud).
servers:
  - url: https://api.fact0.io
    description: Fact0 Cloud
security: []
tags:
  - name: Ingest
  - name: Query
  - name: Replay
paths:
  /api/v1/executions/{executionID}/spans:
    post:
      tags:
        - Ingest
      summary: Ingest spans for an execution
      operationId: ingestSpans
      parameters:
        - $ref: '#/components/parameters/ExecutionID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - spans
              properties:
                spans:
                  type: array
                  items:
                    $ref: '#/components/schemas/Span'
      responses:
        '200':
          description: Spans accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestResponse'
components:
  parameters:
    ExecutionID:
      name: executionID
      in: path
      required: true
      schema:
        type: string
  schemas:
    Span:
      type: object
      properties:
        id:
          type: string
        execution_id:
          type: string
        parent_span_id:
          type: string
        caused_by_span_ids:
          type: array
          items:
            type: string
        span_type:
          type: string
          enum:
            - TOOL_CALL
            - MODEL_INVOCATION
            - STATE_MUTATION
            - HUMAN_APPROVAL
            - POLICY_EVALUATION
            - CUSTOM
        name:
          type: string
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELLED
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties:
            type: string
    IngestResponse:
      type: object
      properties:
        accepted_count:
          type: integer
        errors:
          type: array
          items:
            $ref: '#/components/schemas/IngestError'
    IngestError:
      type: object
      properties:
        entity_id:
          type: string
        code:
          type: string
        message:
          type: string

````