---
title: "Import Testset"
method: POST
path: "/testsets/endpoint"
tags: ["Testsets"]
---

# Import Testset

`POST /testsets/endpoint`

Import JSON testset data from an endpoint and save it to Postgres.

Args:
    endpoint (str): An endpoint URL to import data from.
    testset_name (str): the name of the testset if provided.

Returns:
    dict: The result of the import process.

## Query parameters

- `authorization` string, nullable

## Response `200`

Successful Response

- TestSetSimpleResponse
  - `id` string, required
  - `name` string, required
  - `created_at` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2025-06-27** `e3e84db47198` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/testsets/endpoint/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/revisions/e3e84db47198/schema)
