---
title: "Attach Test"
method: PUT
path: "/v1/agent/agents/{agent_id}/tests/{test_id}"
tags: ["Agent Tests"]
---

# Attach Test

`PUT /v1/agent/agents/{agent_id}/tests/{test_id}`

## Request

- Base URL: `https://api.fish.audio`
- URL: `https://api.fish.audio/v1/agent/agents/{agent_id}/tests/{test_id}`
- Auth: HTTP bearer

Attach a test to an agent so the agent's test runs include it. Attaching
an attached test does nothing. The agent and the test must be in the same
workspace.

## Path parameters

- `agent_id` string, required
- `test_id` string, required

## Response `204`

Request fulfilled, nothing follows

## Other responses

- `400`: Bad request syntax or unsupported method
- `401`: No permission -- see authorization schemes
- `404`: Nothing matches the given URI
- `503`: The server cannot process the request due to a high load

## Changes

- **2026-11-03** `42ac421f7a12`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fish/apis/fishaudio-openapi/changes/v1/agent/agents/:agent_id/tests/:test_id/put.md)

---

[API](https://skmtc.dev/fish/apis/fishaudio-openapi.md) - [All operations](https://skmtc.dev/fish/apis/fishaudio-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/fish/apis/fishaudio-openapi/revisions/42ac421f7a12?raw)
