# Create Simple Testset From File

Source: https://agenta.ai/docs/reference/api/create-simple-testset-from-file

`POST /simple/testsets/upload`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Create Simple Testset From File

## Request body schema

Content type: `multipart/form-data` (required)

- `file` (string, required)
- `file_type` (string, one of: "csv", "json") Default: `"csv"`.
- `testset_slug` (string, nullable)
- `testset_name` (string, nullable)
- `testset_description` (string, nullable)
- `testset_tags` (string, nullable)
- `testset_meta` (string, nullable)

## Response schemas

### 200: Successful Response

- `count` (integer): 1 if a testset was returned, 0 otherwise. Default: `0`.
- `testset` (object, nullable): The testset with its latest revision testcases merged into `data.testcases`, and the revision ID on `revision_id`.
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)
  - `data` (object, nullable)
    - `testcase_ids` (array of string (uuid), nullable)
    - `testcases` (array of object, nullable)
  - `revision_id` (string (uuid), nullable)
  - `variant_id` (string (uuid), nullable)
- … more fields: see the OpenAPI specification.

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
