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

# Ingest Traces

> OTLP/HTTP trace export. The body is a binary `ExportTraceServiceRequest` protobuf (`Content-Type: application/x-protobuf`), optionally gzip-compressed (`Content-Encoding: gzip`). Spans that fail to decode or persist are dropped individually and counted in `rejected_spans`; the rest of the batch is still accepted.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/otlp/v1/traces
openapi: 3.1.0
info:
  title: Visceral Backend
  version: 0.2.0
  description: >-
    The Visceral backend HTTP API. SDK and ingestion endpoints authenticate with
    a workspace API key; dashboard and CLI endpoints authenticate with a user
    session token. Both are sent as `Authorization: Bearer <token>`.
servers:
  - url: https://api.visceralai.dev
security: []
paths:
  /v1/otlp/v1/traces:
    post:
      tags:
        - otlp
      summary: Ingest Traces
      description: >-
        OTLP/HTTP trace export. The body is a binary `ExportTraceServiceRequest`
        protobuf (`Content-Type: application/x-protobuf`), optionally
        gzip-compressed (`Content-Encoding: gzip`). Spans that fail to decode or
        persist are dropped individually and counted in `rejected_spans`; the
        rest of the batch is still accepted.
      operationId: ingest_traces_v1_otlp_v1_traces_post
      requestBody:
        required: true
        content:
          application/x-protobuf:
            schema:
              type: string
              format: binary
              description: OTLP ExportTraceServiceRequest protobuf
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestResponse'
      security:
        - workspaceApiKey: []
components:
  schemas:
    IngestResponse:
      properties:
        accepted_spans:
          type: integer
          title: Accepted Spans
        rejected_spans:
          type: integer
          title: Rejected Spans
          default: 0
      type: object
      required:
        - accepted_spans
      title: IngestResponse
  securitySchemes:
    workspaceApiKey:
      type: http
      scheme: bearer
      description: >-
        Workspace API key (`vsc_live_...`), minted from the dashboard or
        `visceral key create`. Identifies the SDK/proxy as a workspace.

````