Update a test
Update a curated set of test metadata fields. Scope: tests:write.
/api/v1/tests/{id}
🔒 API keyUpdates a curated subset of a test’s metadata — never the question content. Scope: tests:write. Requires employer-write authority in one of the test’s organizations (admins bypass; platform-global tests with no organization are admin-only). Send only the fields you want to change.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The test id. |
Request body
| Field | Type | Description |
|---|---|---|
name | string | Test name. |
description | string | Test description. |
analysisCategory | string | Analysis category. |
language | string | Language (ISO 639-1). |
type | string | Test type. |
targetPersona | string | null | Target persona. |
duration | integer | Duration in minutes. |
Example request
curl -X PATCH https://app.talent-ray.com/api/v1/tests/test_js \
-H "Authorization: Bearer tr_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "JavaScript Fundamentals (2026)", "duration": 35 }'
Response
200 OK — the updated test (same shape as Get a test).
Status codes
| Status | Meaning |
|---|---|
200 | Updated. |
400 | bad_request — invalid or empty body. |
401 | No valid API key. |
403 | insufficient_scope (missing tests:write) or forbidden (no write authority in the test’s org). |
404 | Not found, or not visible to the key. |
429 | Rate limit exceeded. |