---
title: "POST /datasets"
method: POST
path: "/datasets"
---

# POST /datasets

`POST /datasets`

Creates a new dataset resource asynchronously. Returns immediately with status CREATING. Poll <code>GetDataset</code> until status transitions to ACTIVE or CREATE_FAILED.

## 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>.
  - `datasetName` string, required — Human-readable name for the dataset. Must be unique within the account. Immutable after creation.
  - `description` string — A description of the dataset.
  - `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>).
  - `schemaType` 'AGENTCORE_EVALUATION_PREDEFINED_V1' | 'AGENTCORE_EVALUATION_SIMULATED_V1', required — Versioned schema type for dataset examples. Each value identifies both the source format and the version of that format's schema.
  - `kmsKeyArn` string — Optional KMS key ARN for server-side encryption on service Amazon S3 writes.
  - `tags` object — A map of tag keys and values to assign to the dataset.

## Response `202`

Success

- CreateDatasetResponse
  - `datasetArn` string, required — The Amazon Resource Name (ARN) of the created dataset.
  - `datasetId` string, required — The unique identifier of the created dataset.
  - `status` 'CREATING' | 'UPDATING' | 'DELETING' | 'ACTIVE' | 'CREATE_FAILED' | 'UPDATE_FAILED' | 'DELETE_FAILED', required — Always CREATING immediately after this call. Poll <code>GetDataset</code> until status transitions to ACTIVE or CREATE_FAILED.
  - `createdAt` string, date-time, required — The timestamp when the dataset was created.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — ValidationException
- `482` — ConflictException
- `483` — AccessDeniedException
- `484` — ThrottlingException
- `485` — 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)
