Skip to main content
PUT
/
api
/
agents
/
{id}
/
test-prompts
/
{promptId}
Update evaluation question
curl --request PUT \
  --url https://agent-evalserver-production.up.railway.app/api/agents/{id}/test-prompts/{promptId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompt": "What is your refund policy for annual plans?",
  "expectedAnswer": "Customers can request a refund within 30 days of purchase."
}
'
{
  "id": 42,
  "prompt": "What is your refund policy for annual plans?",
  "expectedAnswer": "Customers can request a refund within 30 days of purchase.",
  "testAnswer": null,
  "created_at": "2026-06-02T15:10:00Z",
  "updated_at": "2026-06-02T15:18:00Z"
}

Authorizations

x-api-key
string
header
required

Platform API key for authenticated account-level API access

Path Parameters

id
string<uuid>
required

Evaluation agent ID.

promptId
integer
required

Evaluation question ID.

Body

application/json

Update one evaluation question and its optional expected answer.

prompt
string

Updated question or task sent to the evaluated agent.

Example:

"What is your refund policy for annual plans?"

expectedAnswer
string | null

Updated reference answer used during evaluation.

Example:

"Customers can request a refund within 30 days of purchase."

Response

Evaluation question updated

Question and optional expected answer used to evaluate an agent response.

id
integer

Numeric prompt identifier. Use this ID when submitting a result for the prompt.

Example:

42

prompt
string

Question or task sent to the evaluated agent.

Example:

"What is your refund policy?"

expectedAnswer
string | null

Optional answer used as the reference for evaluation.

Example:

"Customers can request a refund within 30 days."

testAnswer
string | null

Latest answer captured for this prompt, when available.

Example:

"Customers can request a refund within 30 days of purchase."

created_at
string<date-time>

Creation timestamp.

Example:

"2026-06-02T15:10:00Z"

updated_at
string<date-time>

Last update timestamp.

Example:

"2026-06-02T15:12:00Z"