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

# Ingest OTLP/JSON traces

> Receives an OTLP/JSON trace payload and persists spans as Galtea Trace records. Authenticated via standard API key (processAccessTokenMiddleware); the authenticated user is the tenant and RBAC applies. Any payload customer.id resource attribute is ignored on this public path.




## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /otel/traces
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /otel/traces:
    post:
      tags:
        - traces
      summary: Ingest OTLP/JSON traces
      description: >
        Receives an OTLP/JSON trace payload and persists spans as Galtea Trace
        records. Authenticated via standard API key
        (processAccessTokenMiddleware); the authenticated user is the tenant and
        RBAC applies. Any payload customer.id resource attribute is ignored on
        this public path.
      operationId: ingestOtelTraces
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - resourceSpans
              properties:
                resourceSpans:
                  type: array
                  items:
                    type: object
                    properties:
                      resource:
                        type: object
                        properties:
                          attributes:
                            type: array
                            items:
                              type: object
                      scopeSpans:
                        type: array
                        items:
                          type: object
                          properties:
                            spans:
                              type: array
                              items:
                                type: object
      responses:
        '200':
          description: Traces ingested (OTLP ExportTraceServiceResponse)
          content:
            application/json:
              schema:
                type: object
                properties:
                  partialSuccess:
                    type: object
                    properties:
                      rejectedSpans:
                        type: integer
                        description: Number of spans that failed ingestion
                      errorMessage:
                        type: string
                        description: Error details when spans are rejected
        '400':
          description: Invalid OTLP payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````