---
title: "Auto-fetch agent from provider"
method: POST
path: "/test_framework/v3/aiagents/{id}/auto-fetch/"
tags: ["test_framework"]
---

# Auto-fetch agent from provider

`POST /test_framework/v3/aiagents/{id}/auto-fetch/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v3/aiagents/{id}/auto-fetch/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer

Re-fetch the agent's configuration from its connected provider (Retell, VAPI, ElevenLabs, Synthflow, Bland) — system prompt, call settings, phone number, tools with mock data, dynamic variables and knowledge base — and return the import result. Updates the agent in place. Usually takes under 2 minutes.

## Path parameters

- `id` string, required

## Response `200`

- object
  - `status` 'completed' | 'failed': `failed` when the job could not produce its result; see `error` / `errors`.
  - `agent_id` integer
  - `current_stage` string
  - `stages` object[]
    - `key` string
    - `label` string
    - `status` 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped'
    - `detail` string, nullable
  - `error` string, nullable: Why the job failed, when it did.

## Other responses

- `400`
- `403`: No access to the agent, project, metric or result the job runs on.
- `504`: The job did not finish within 15 minutes. It may still complete in the background.

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v3/aiagents/:id/auto-fetch/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
