Create test

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

Adds a test to the app. A test is a goal written in plain language that the testing agent tries to accomplish in a real browser when you run it.

Set role to run the test as a user with that role. Leave it out and Base44 picks a role named in the test's name or goal, such as "as an admin", or runs as a regular user when neither names one.

An app can have up to 250 tests. Creating a test is free. Running it costs credits.

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>

post/api/apps/{app_id}/testing-agent/flows

Path parameters

app_idstring required

ID of the app.

ID of the app.

Request body

namestring required

Short name for the test.

goalstring required

What the testing agent should try to do, in plain language.

rolestring nullable

Role to run the test as, such as admin. Leave it out to let Base44 pick one from the name or goal.

Example request

{
  "name": "Create a project",
  "goal": "Sign up, create a project called Launch, and check that it appears on the dashboard.",
  "role": "admin"
}

Response

The created test.

idstring required

ID of the test.

app_idstring required

ID of the app the test belongs to.

namestring required

Short name of the test.

goalstring required

What the testing agent tries to do, in plain language.

rolestring 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.

sourcestring required

manual for a test you created, app_context for one Base44 generated from the app.

revisioninteger required

Starts at 1 and goes up each time the test is edited.

created_datestring required

When the test was created, as an ISO 8601 UTC timestamp.

updated_datestring required

When the test last changed, as an ISO 8601 UTC timestamp.

Example response

{
  "id": "68a1c2e4f0b3d9001a7e5c21",
  "app_id": "6820f3a4e7b91d003c45a1f2",
  "name": "Create a project",
  "goal": "Sign up, create a project called Launch, and check that it appears on the dashboard.",
  "role": "admin",
  "source": "manual",
  "revision": 1,
  "created_date": "2026-09-28T10:15:00+00:00",
  "updated_date": "2026-09-28T10:15:00+00:00"
}

Changes

Changed in 1 of the 22 revisions of this API.1

Of the 22 revisions, 1 has no diff computed.