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

# Update Trace Metadata

> 
Merge custom metadata into an existing trace. Use to enrich traces with post-hoc context.



## OpenAPI

````yaml https://app.freeplay.ai/openapi.json patch /api/v2/projects/{project_id}/sessions/{session_id}/traces/id/{trace_id}/metadata
openapi: 3.1.0
info:
  title: Freeplay API
  version: 0.1.0
servers: []
security:
  - BearerAuth: []
paths:
  /api/v2/projects/{project_id}/sessions/{session_id}/traces/id/{trace_id}/metadata:
    patch:
      tags:
        - Observability
      summary: Update Trace Metadata
      description: >-

        Merge custom metadata into an existing trace. Use to enrich traces with
        post-hoc context.
      operationId: patch_update_trace_metadata
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
        - name: session_id
          in: path
          required: true
          schema:
            type: string
        - name: trace_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties:
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
                  - type: boolean
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  message:
                    title: Message
                    type: string
                required:
                  - message
                title: SimpleResponseWithMessage
                type: object
          description: 'SimpleResponseWithMessage(message: str)'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````