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

# Submit bulk metrics for a card

> Submit multiple metrics related to a specific card identified by `cardId`. This allows for bulk import of metric datapoints for tracking and performance measurement.



## OpenAPI

````yaml https://api.vistaly.com/v1/swagger.json post /v1/cards/{cardId}/metrics/bulk
openapi: 3.1.0
info:
  contact:
    email: support@vistaly.com
    name: Vistaly Support Team
  description: >-
    Vistaly's public API for interacting with our platform, enabling developers
    to integrate with various features such as feedback, cards, and system
    health.
  termsOfService: https://vistaly.com/terms-of-service
  title: Vistaly API
  version: '2025-06-21'
servers:
  - description: Production server
    url: https://api.vistaly.com
security: []
tags:
  - description: System-related endpoints to interact with the overall service.
    name: system
  - description: >-
      Endpoints related to card management, including the creation and
      modification of card metrics and related data.
    externalDocs:
      description: Learn more about Cards
      url: https://docs.vistaly.com/en/card-types/overview
    name: cards
  - description: >-
      Endpoints for handling insights data, such as user feedback and interview
      records.
    externalDocs:
      description: Learn more about Insights
      url: https://docs.vistaly.com/en/insights/overview
    name: insights
paths:
  /v1/cards/{cardId}/metrics/bulk:
    post:
      tags:
        - cards
      summary: Submit bulk metrics for a card
      description: >-
        Submit multiple metrics related to a specific card identified by
        `cardId`. This allows for bulk import of metric datapoints for tracking
        and performance measurement.
      parameters:
        - description: >-
            The unique identifier for the card whose metrics are being
            submitted.
          in: path
          name: cardId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCardMetricsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                message: Bulk metric import completed
                succeeded: 950
                failed:
                  - index: 42
                    metric:
                      value: -1
                      timestamp: '2024-01-01T00:00:00Z'
                    error: Unknown error occurred
              schema:
                $ref: '#/components/schemas/BulkCardMetricsResponse'
          description: Bulk metrics import completed (may include partial failures)
        '400':
          description: Bad request
          content:
            application/json:
              example:
                message: Bad request
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                message: Unauthorized
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                message: Forbidden
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                message: Internal Server Error
              schema:
                $ref: '#/components/schemas/MessageResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    BulkCardMetricsRequest:
      additionalProperties: false
      properties:
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/CardMetricsRequest'
          minItems: 1
          maxItems: 1000
          description: Array of metric datapoints to be created
      required:
        - metrics
      type: object
    BulkCardMetricsResponse:
      additionalProperties: false
      properties:
        message:
          type: string
        succeeded:
          type: integer
          description: Number of metric datapoints successfully created
        failed:
          type: array
          items:
            $ref: '#/components/schemas/BulkMetricError'
          description: Details of metric datapoints that failed to create
      required:
        - message
        - succeeded
        - failed
      type: object
    MessageResponse:
      additionalProperties: false
      properties:
        message:
          example: System provided message
          type: string
      type: object
    CardMetricsRequest:
      additionalProperties: false
      properties:
        timestamp:
          description: >-
            The timestamp of the metric (defaults to current timestamp if not
            provided)
          format: date-time
          type: string
        value:
          description: The value of the metric (e.g., count of views or clicks)
          type: number
      required:
        - value
      type: object
    BulkMetricError:
      additionalProperties: false
      properties:
        index:
          type: integer
          description: Index of the failed metric in the original request array
        metric:
          $ref: '#/components/schemas/CardMetricsRequest'
          description: The metric data that failed to be created
        error:
          type: string
          description: Error message explaining why this metric failed
      required:
        - index
        - metric
        - error
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````