---
title: "Adds a new example to an audience."
method: POST
path: "/audience/{audienceId}/example"
tags: ["Examples"]
---

# Adds a new example to an audience.

`POST /audience/{audienceId}/example`

## Path parameters

- `audienceId` string, required

## Request body

- AddExampleToAudienceEndpointInput — Input model for adding an example to an audience.
  - `asset` union, required
    - object
      - `_t` 'ExistingAssetInput', required
      - `name` string, required
      - `metadata` object, nullable
      - `identifier` string, nullable
    - object
      - `_t` 'MultiAssetInput', required
      - `assets` IAssetInput[], required
      - `metadata` object, nullable
      - `identifier` string, nullable
    - object
      - `_t` 'TextAssetInput', required
      - `text` string, required
      - `metadata` object, nullable
      - `identifier` string, nullable
  - `payload` union, required
    - object
      - `_t` 'ClassifyExamplePayload', required
      - `categories` ExampleCategory[], required
        - `label` string, required
        - `value` string, required
      - `title` string, required
    - object
      - `_t` 'CompareExamplePayload', required
      - `criteria` string, required
    - object
      - `_t` 'LineExamplePayload', required
      - `target` string, required
    - object
      - `_t` 'LocateExamplePayload', required
      - `target` string, required
    - object
      - `_t` 'ScrubExamplePayload', required
      - `target` string, required
    - object
      - `_t` 'TranscriptionExamplePayload', required
      - `title` string, required
      - `transcription` ExampleTranscriptionWord[], required
        - `word` string, required
        - `wordIndex` integer, required
  - `truth` union
    - object
      - `_t` 'ClassifyExampleTruth', required
      - `correctCategories` string[], required
    - object
      - `_t` 'CompareExampleTruth', required
      - `winnerId` string, required
    - object
      - `_t` 'LineExampleTruth', required
      - `boundingBoxes` ExampleBoxShape[], nullable
        - `xMin` number, double, nullable
        - `yMin` number, double, nullable
        - `xMax` number, double, nullable
        - `yMax` number, double, nullable
      - `requiredPrecision` number, double, nullable
      - `requiredCompleteness` number, double, nullable
    - object
      - `_t` 'LocateExampleTruth', required
      - `boundingBoxes` ExampleBoxShape[], required
        - `xMin` number, double, nullable
        - `yMin` number, double, nullable
        - `xMax` number, double, nullable
        - `yMax` number, double, nullable
      - `requiredPrecision` number, double, nullable
      - `requiredCompleteness` number, double, nullable
    - object
      - `_t` 'ScrubExampleTruth', required
      - `validRanges` ExampleScrubRange[], required
        - `start` integer, required
        - `end` integer, required
    - object
      - `_t` 'TranscriptionExampleTruth', required
      - `correctWords` ExampleTranscriptionWord[], required
        - `word` string, required
        - `wordIndex` integer, required
      - `strictGrading` boolean, nullable
      - `requiredPrecision` number, double, nullable
      - `requiredCompleteness` number, double, nullable
  - `randomCorrectProbability` number, double, required — The probability for an answer to be correct when randomly guessing.
  - `explanation` string, nullable — An explanation for the users if they answer the example incorrectly.
  - `context` string, nullable — An optional textual context that provides additional information to the user.
  - `contextAsset` union
    - object
      - `_t` 'ExistingAssetInput', required
      - `name` string, required
      - `metadata` object, nullable
      - `identifier` string, nullable
    - object
      - `_t` 'MultiAssetInput', required
      - `assets` IAssetInput[], required
      - `metadata` object, nullable
      - `identifier` string, nullable
    - object
      - `_t` 'TextAssetInput', required
      - `text` string, required
      - `metadata` object, nullable
      - `identifier` string, nullable
  - `sortIndex` integer, nullable — The sort index that controls the serving order of this example within the audience. When null, the next sort index is automatically calculated.
  - `featureFlags` FeatureFlag[], nullable — The feature flags to enable for the example.
    - `key` string, required
    - `value` string, required
  - `isCommonSense` boolean, nullable — Whether this example should be treated as commonsense validation. When true, incorrect answers are not accepted and the example affects global score. When null, AI auto-detection will determine if the example is common sense.
  - `visibility` 'Private' | 'Public'

## Response `200`

OK

- AddExampleToAudienceEndpointOutput
  - `recalculationId` string, nullable — The id of the audience state recalculation dispatched as a result of adding this example. Null when the example addition cannot transition any user's state (e.g. the audience already has more examples than MaxDistillingResponses + 1).

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/d779de93a5ee/schema)
