---
title: "Update test"
method: PATCH
path: "/api/apps/{app_id}/testing-agent/flows/{flow_id}"
---

# Update test

`PATCH /api/apps/{app_id}/testing-agent/flows/{flow_id}`

## Request

- Base URL: `https://app.base44.com`
- URL: `https://app.base44.com/api/apps/{app_id}/testing-agent/flows/{flow_id}`
- Auth: HTTP bearer

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Changes a test's name, goal or role. Send only the fields you want to change. Send `role` as `null` to clear it, so Base44 picks a role from the test's name or goal again.

Each edit raises the test's `revision` by 1. You can't edit a test while it has a run going, so [cancel the run](/api-reference/cancel-test-run) or wait for it to end first.

This is limited to 300 requests per minute per caller for each app. Some workspaces have a different limit.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. Read-only keys and workspace API keys are refused.</Note>

## Path parameters

- `app_id` string, required: ID of the app.
- `flow_id` string, required: ID of the test to update.

## Request body

- UpdateFlowRequest
  - `name` string, nullable: New name for the test.
  - `goal` string, nullable: New goal for the test, in plain language.
  - `role` string, nullable: Role to run the test as. Send `null` to clear it, so Base44 picks one from the name or goal again.

## Response `200`

The updated test.

- FlowResponse: A test: a goal the testing agent tries to accomplish in a browser.
  - `id` string, required: ID of the test.
  - `app_id` string, required: ID of the app the test belongs to.
  - `name` string, required: Short name of the test.
  - `goal` string, required: What the testing agent tries to do, in plain language.
  - `role` string, nullable: Role set on the test, or `null` when none is set. A test without one can still run as a role its name or goal names. The run's `flow_role` shows the role actually used.
  - `source` string, required: `manual` for a test you created, `app_context` for one Base44 generated from the app.
  - `revision` integer, required: Starts at 1 and goes up each time the test is edited.
  - `created_date` string, required: When the test was created, as an ISO 8601 UTC timestamp.
  - `updated_date` string, required: When the test last changed, as an ISO 8601 UTC timestamp.

## Other responses

- `400`: You sent no fields, or `name` or `goal` is only whitespace.
- `401`: Missing or invalid credentials.
- `403`: You don't have editor access to this app, the app is blocked, or your API key is read-only or a workspace API key.
- `404`: App or test not found.
- `409`: The test has a run going, or your workspace requires an unlocked SSO session.
- `422`: Validation Error
- `429`: Rate limit exceeded.

## Changes

> 58 revisions in range; 1 not diffed.

- **2026-10-12** `5e139db2e643`: 1 info
  - the endpoint scheme security `PersonalAccessTokenAuth` was added to the API
- **2026-10-06** `dddf17e0f9f0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/adexad/apis/base44-app-management-api/changes/api/apps/:app_id/testing-agent/flows/:flow_id/patch.md)

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adexad/apis/base44-app-management-api/revisions/fa29e915c226?raw)
