---
title: "Update a test using the legacy PUT alias"
method: PUT
path: "/api/tests/{id}"
tags: ["Tests"]
---

# Update a test using the legacy PUT alias

`PUT /api/tests/{id}`

## Request

- Base URL: `https://demo.supercheck.dev`
- URL: `https://demo.supercheck.dev/api/tests/{id}`
- Auth: HTTP bearer

Update test title, script, description, type, or priority. PUT is retained for CLI deploy and backward compatibility; interactive partial updates should prefer PATCH. Requires `test:update`, checked before the ID; for an authorized caller, a malformed ID returns 404.

## Request body

- object
  - `title` string
  - `script` string
  - `description` string
  - `type` 'browser' | 'api' | 'performance' | 'database' | 'custom'
  - `priority` 'low' | 'medium' | 'high': Test priority. Any other value returns 400.

## Response `200`

Test updated

- Test
  - `id` string, uuid
  - `name` string, nullable
  - `title` string
  - `description` string, nullable
  - `priority` 'low' | 'medium' | 'high': Test priority
  - `type` 'browser' | 'api' | 'performance' | 'database' | 'custom': Test type. `browser` = Playwright, `performance` = k6
  - `script` string, nullable: Test script content
  - `projectId` string, uuid, nullable
  - `organizationId` string, uuid, nullable
  - `tags` Tag[]
    - `id` string, uuid
    - `name` string
    - `color` string, nullable
  - `createdByName` string, nullable
  - `createdByImage` string, nullable
  - `createdAt` string, date-time, nullable
  - `updatedAt` string, date-time, nullable

## Other responses

- `400`: Invalid priority or body
- `401`: Authentication required or token invalid
- `404`: Resource not found

## Changes

- **2026-10-28** `4531981d91c6`: 2 info
  - added the optional property `createdByImage` to the response with the `200` status
  - added the optional property `createdByName` to the response with the `200` status
- **2026-10-25** `9d4e9599f8c5`: 2 info
  - added the new optional request property `priority`
  - added the non-success response with the status `400`
- **2026-10-01** `0114b54c259d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/supercheck-io/apis/supercheck-api/changes/api/tests/:id/put.md)

---

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