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

# Add datapoints to a dataset

> Add new datapoints to an existing dataset. Provide raw data objects and a field mapping that specifies which fields map to inputs, ground truth, and history.




## OpenAPI

````yaml https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/openapi.yaml post /v1/datasets/{dataset_id}/datapoints
openapi: 3.1.0
info:
  title: HoneyHive Data Plane API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.2.1
servers:
  - url: https://api.honeyhive.ai
security:
  - BearerAuth: []
tags:
  - name: Charts
    description: >
      Define and manage saved charts. Charts are visualizations that aggregate
      metrics over time with bucketing, filters, and groupings.
  - name: Configurations
    description: >
      Manage prompt configurations, i.e. model parameters, message templates,
      and response settings that can be versioned and deployed without code
      changes.
  - name: Datapoints
    description: >
      Manage individual records inside datasets, including batch creation and
      mapping to source events.
  - name: Datasets
    description: >
      Curate collections of datapoints used as test sets for evaluations and
      experiments.
  - name: Events
    description: >
      Read and write trace events. Events are the spans that capture every step
      of an AI application's execution.
  - name: Experiments
    description: >
      Run, retrieve, and compare evaluation runs to measure how prompt or
      configuration changes affect agent performance.
  - name: Metric Versions
    description: >
      Snapshot, list, and deploy versions of a metric's definition so changes
      can be reviewed and rolled back without losing history.
  - name: Metrics
    description: >
      Define and run evaluators, i.e. automated quality checks that score traces
      against criteria like accuracy, safety, or correctness.
  - name: Queues
    description: >
      Manage annotation queues for human review of traces, turning expert
      feedback into labeled datasets.
  - name: Sessions
    description: >
      Group related trace events into sessions, the top-level container for a
      multi-step or multi-service AI interaction.
paths:
  /v1/datasets/{dataset_id}/datapoints:
    post:
      tags:
        - Datasets
      summary: Add datapoints to a dataset
      description: >
        Add new datapoints to an existing dataset. Provide raw data objects and
        a field mapping that specifies which fields map to inputs, ground truth,
        and history.
      operationId: addDatapoints
      parameters:
        - in: path
          name: dataset_id
          required: true
          schema:
            type: string
          description: >-
            The unique identifier of the dataset to add datapoints to like 
            `663876ec4611c47f4970f0c3`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddDatapointsToDatasetRequest'
      responses:
        '200':
          description: Successful addition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddDatapointsResponse'
components:
  schemas:
    AddDatapointsToDatasetRequest:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: {}
          minItems: 1
          description: Array of datapoint data objects to add
        mapping:
          $ref: '#/components/schemas/DatapointMapping'
          description: Field mapping for inputs, ground truth, and history
      required:
        - data
        - mapping
      description: Request body for POST /datasets/{dataset_id}/datapoints
    AddDatapointsResponse:
      type: object
      properties:
        inserted:
          type: boolean
        datapoint_ids:
          type: array
          items:
            type: string
            minLength: 1
      required:
        - inserted
        - datapoint_ids
      description: Response for POST /datasets/{dataset_id}/datapoints
    DatapointMapping:
      type: object
      properties:
        inputs:
          type: array
          items:
            type: string
          default: []
        history:
          type: array
          items:
            type: string
          default: []
        ground_truth:
          type: array
          items:
            type: string
          default: []
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````