---
title: "Import Agent Turn"
method: POST
path: "/questionnaires/jobs/{job_id}/import-agent"
tags: ["questionnaires"]
---

# Import Agent Turn

`POST /questionnaires/jobs/{job_id}/import-agent`

## Request

- Base URL: `https://api.threadchain.pro` (the document declares no server; this is the origin it was published from)
- URL: `https://api.threadchain.pro/questionnaires/jobs/{job_id}/import-agent`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Starts one turn of the import-wizard agent as a Celery run: stores attachments
by id, creates an idempotent ``AgentRun``, and returns ``202 {run_id}``. The bounded
tool loop always executes off the request thread (``import_agent_tasks.run_import_agent_task``).

## Path parameters

- `job_id` string, uuid, required

## Headers

- `Idempotency-Key` string, nullable

## Request body `multipart/form-data`

- BodyImportAgentTurnQuestionnairesJobsJobIdImportAgentPost
  - `message` string, nullable
  - `files` string[]

## Response `202`

Successful Response

- ImportAgentStartResponse
  - `run_id` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/threadchain/apis/threadchain-backend.md) - [All operations](https://skmtc.dev/threadchain/apis/threadchain-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/threadchain/apis/threadchain-backend/revisions/8ee288a7e6bd?raw)
