---
title: "POST /datasets/{datasetId}/examples/add"
method: POST
path: "/datasets/{datasetId}/examples/add"
---

# POST /datasets/{datasetId}/examples/add

`POST /datasets/{datasetId}/examples/add`

Adds examples to the dataset's DRAFT. All examples are validated against the dataset's schema type before any writes occur. If any example fails validation, the entire batch is rejected (all-or-nothing semantics).

## Path parameters

- `datasetId` string, required

## Request body

- object
  - `clientToken` string — A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.
  - `source` object, required — Source of examples to add to the dataset.
    - `inlineExamples` object — Inline examples provided directly in the request body.
      - `examples` SensitiveJson[], required — Examples to add. Each example is assigned an auto-generated UUID.
    - `s3Source` object — Amazon S3 URI pointing to a JSONL file in the customer's bucket.
      - `s3Uri` string, required — Amazon S3 URI of the JSONL file (for example, <code>s3://my-bucket/path/to/examples.jsonl</code>).

## Response `202`

Success

- AddDatasetExamplesResponse
  - `datasetArn` string, required — The Amazon Resource Name (ARN) of the dataset.
  - `datasetId` string, required — The unique identifier of the dataset.
  - `status` 'CREATING' | 'UPDATING' | 'DELETING' | 'ACTIVE' | 'CREATE_FAILED' | 'UPDATE_FAILED' | 'DELETE_FAILED', required — The current status of the dataset.
  - `addedCount` integer, required — The number of examples added.
  - `updatedAt` string, date-time, required — The timestamp when the examples were added.
  - `exampleIds` ExampleId[], required — IDs of all added examples (auto-generated UUIDs).

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — ValidationException
- `482` — ConflictException
- `483` — AccessDeniedException
- `484` — ResourceNotFoundException
- `485` — ThrottlingException
- `486` — InternalServerException

---

[API](https://skmtc.net/aws/apis/bedrock-agentcore-control.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agentcore-control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agentcore-control/versions/0ebde766792b/schema)
