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

# Submit a customer metric

> Create or replace a customer-provided metric for a call. Send a `verdict` (pass/fail) and/or a `score` (0–100), and optionally map it to one of your Zelto metrics with `metricId`. Idempotent on `(conversation, label)`: resubmitting the same `label` replaces the prior value. Requires metrics to be enabled for the organization.



## OpenAPI

````yaml /docs-openapi.json post /v1/conversations/{id}/customer-metrics
openapi: 3.1.0
info:
  title: Zelto REST API
  version: v1
  description: >-
    Programmatic access to your Zelto organization. Every endpoint is scoped to
    the organization the API key belongs to. Mint a key at Settings →
    Integrations → API Call Upload.
servers:
  - url: https://api.zelto.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Voice and chat bots normalised through Zelto's ingestion pipeline.
  - name: Conversations
    description: Calls, chats, and voicemails — plus their transcripts and recordings.
  - name: Customer Metrics
    description: >-
      Customer-provided evaluations attached to a call (requires metrics
      enabled).
  - name: Reviews
    description: Human review state for conversations.
  - name: Buckets
    description: Reviewer routing — group conversations for batched review.
  - name: Findings
    description: >-
      Structured issues discovered during analysis, with optional conversation
      attachments and comments.
  - name: Organizations
    description: >-
      Headless org provisioning. Requires an admin/service API key (not a
      read-only org-scoped customer key).
paths:
  /v1/conversations/{id}/customer-metrics:
    post:
      tags:
        - Customer Metrics
      summary: Submit a customer metric
      description: >-
        Create or replace a customer-provided metric for a call. Send a
        `verdict` (pass/fail) and/or a `score` (0–100), and optionally map it to
        one of your Zelto metrics with `metricId`. Idempotent on `(conversation,
        label)`: resubmitting the same `label` replaces the prior value.
        Requires metrics to be enabled for the organization.
      operationId: createCustomerMetric
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - label
              description: Provide at least one of `verdict` or `score`.
              properties:
                label:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    The customer's name for this metric, e.g. "Compliance
                    Check".
                verdict:
                  type: string
                  enum:
                    - pass
                    - fail
                score:
                  type: number
                  minimum: 0
                  maximum: 100
                note:
                  type: string
                  maxLength: 5000
                metricId:
                  type: string
                  format: uuid
                  description: >-
                    Map this customer metric to one of your Zelto metrics on the
                    call's agent.
                externalId:
                  type: string
                  maxLength: 255
                  description: Your own id for this record.
      responses:
        '201':
          description: The created (or replaced) customer metric.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerMetric'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Metrics are not enabled, or the mapped metric is not in your
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CustomerMetric:
      type: object
      required:
        - id
        - organizationId
        - conversationId
        - agentId
        - label
        - source
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
          format: uuid
        conversationId:
          type: string
          format: uuid
        agentId:
          type: string
          format: uuid
        metricId:
          type: string
          format: uuid
          nullable: true
          description: The Zelto metric this customer metric maps to, if any.
        label:
          type: string
          description: The customer's name for the metric, e.g. "Compliance Check".
        externalId:
          type: string
          nullable: true
          description: The customer's own id for this record.
        verdict:
          type: string
          enum:
            - pass
            - fail
          nullable: true
        score:
          type: number
          nullable: true
          description: 0–100. Null when only a pass/fail verdict was sent.
        note:
          type: string
          nullable: true
        source:
          type: string
          description: Provenance of the record, e.g. `api`.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable error message, e.g. Unauthorized or Validation
            failed.
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  responses:
    ValidationFailed:
      description: Request body failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found in your organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer YOUR_API_KEY`. The key resolves to a single
        organization.

````