Skip to content
Judgment Labs
Esc
↑↓navigate↵open⌘Jpreview

Replace a case in the draft

Replace a case in the draft. For a published case, call create_test_suite_draft first.

PUT/v1/projects/{projectId}/test-suites/{testSuiteId}/cases/{caseId}
Authorization
AuthorizationPersonal API key · headerrequired

Your personal API key from Settings > Personal API Keys, sent as Bearer <key>.

X-Organization-IdOrganization ID · headerrequired

The organization to act in. Copy it with Copy organization ID in the organization menu or the settings sidebar.

Path parameters
projectIdstring<uuid>required
testSuiteIdstring<uuid>required
caseIdstring<uuid>required
Request body
requiredapplication/json
namestring | null
Show properties
Any of:
string
string
null
null
inputanyrequired

What the agent gets.

expectedobject
tagsstring[]
metadataobject
Responses
200

Response for status 200

case_idstringrequired
404

Response for status 404

errorstringrequired
messagestring
codestring
detailsstring[]
409

Response for status 409

errorstringrequired
messagestring
codestring
detailsstring[]
422

Response for status 422

errorstringrequired
messagestring
codestring
detailsstring[]
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://api.judgmentlabs.ai/v1/projects/YOUR_PROJECT_ID/test-suites/YOUR_TEST_SUITE_ID/cases/YOUR_CASE_ID' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'X-Organization-Id: YOUR_ORGANIZATION_ID' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "input": null,
  "expected": {},
  "tags": [
    "string"
  ],
  "metadata": {}
}'
Response
{
  "case_id": "string"
}

Was this page helpful?