These endpoints allow you to manage test suites and flows via the API. All requests require an API key in the X-API-Key header. See API Reference for authentication details.
Suites
List Suites
Get all test suites for your organization.
GET /api/v1/suites — Returns 200 OK
Example Request
curl -X GET https://backend.autosana.ai/api/v1/suites \
-H "X-API-Key: YOUR_API_KEY"
Response Fields
List of suite objects Description of what the suite tests
UUID of the authentication setup flow, if the suite has auth instructions configured
The authentication/login instructions for the suite’s setup flow, if configured
ISO 8601 timestamp of when the suite was created
Total number of suites returned
Example Response
{
"suites" : [
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "Login Feature Tests" ,
"description" : "Tests for user authentication" ,
"setup_flow_id" : "770e8400-e29b-41d4-a716-446655440099" ,
"auth_instructions" : "Tap Login \n Enter ${env:USERNAME} \n Enter ${env:PASSWORD} \n Tap Submit" ,
"created_at" : "2025-01-15T10:30:00Z"
},
{
"id" : "550e8400-e29b-41d4-a716-446655440001" ,
"name" : "Checkout Flow Tests" ,
"description" : null ,
"setup_flow_id" : null ,
"auth_instructions" : null ,
"created_at" : "2025-01-14T09:00:00Z"
}
],
"count" : 2
}
Create Suite
Create a new test suite to organize your flows.
POST /api/v1/suites — Returns 201 Created
Request Body
Name of the test suite (1-255 characters)
Optional description of what the suite tests
Optional login/authentication instructions that run before each flow in the suite. Use ${env:VAR_NAME} placeholders for sensitive values like credentials — configure these in your Environment Settings .
Example Request
curl -X POST https://backend.autosana.ai/api/v1/suites \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "JIRA-1234: User Authentication",
"description": "Auto-generated tests for login feature",
"auth_instructions": "Tap Login\nEnter ${env:USERNAME} into the username field\nEnter ${env:PASSWORD} into the password field\nTap Submit"
}'
Response Fields
Unique identifier (UUID) of the created suite
Description of what the suite tests
UUID of the authentication setup flow. Present when auth_instructions was provided.
The authentication/login instructions for the suite’s setup flow. Echoed back when auth_instructions was provided.
ISO 8601 timestamp of when the suite was created
Example Response
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "JIRA-1234: User Authentication" ,
"description" : "Auto-generated tests for login feature" ,
"setup_flow_id" : "770e8400-e29b-41d4-a716-446655440099" ,
"auth_instructions" : "Tap Login \n Enter ${env:USERNAME} into the username field \n Enter ${env:PASSWORD} into the password field \n Tap Submit" ,
"created_at" : "2025-01-15T10:30:00Z"
}
Flows
List Flows
Get all test flows for your organization. Optionally filter by suite.
GET /api/v1/flows — Returns 200 OK
Query Parameters
Optional. Filter flows by suite ID to get only flows in a specific suite (ordered by position).
Example Request
# Get all flows
curl -X GET https://backend.autosana.ai/api/v1/flows \
-H "X-API-Key: YOUR_API_KEY"
# Get flows in a specific suite
curl -X GET "https://backend.autosana.ai/api/v1/flows?suite_id=550e8400-e29b-41d4-a716-446655440000" \
-H "X-API-Key: YOUR_API_KEY"
Response Fields
List of flow objects Natural language test instructions
Flow type (currently always single-prompt)
Whether caching is enabled for this flow
ISO 8601 timestamp of when the flow was created
Total number of flows returned
Example Response
{
"flows" : [
{
"id" : "660e8400-e29b-41d4-a716-446655440001" ,
"name" : "Login with valid credentials" ,
"instructions" : "Enter valid email and password, tap login, verify home screen" ,
"type" : "single-prompt" ,
"caching_enabled" : true ,
"created_at" : "2025-01-15T10:31:00Z"
},
{
"id" : "660e8400-e29b-41d4-a716-446655440002" ,
"name" : "Login with invalid password" ,
"instructions" : "Enter valid email but wrong password, verify error message" ,
"type" : "single-prompt" ,
"caching_enabled" : true ,
"created_at" : "2025-01-15T10:32:00Z"
}
],
"count" : 2
}
Create Flow
Create a new test flow (test case). Optionally attach it to a suite.
POST /api/v1/flows — Returns 201 Created
Request Body
Name of the test flow (1-255 characters)
Optional UUID of a suite to attach this flow to. The flow will be added to the end of the suite.
Example Request
curl -X POST https://backend.autosana.ai/api/v1/flows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Login with valid credentials",
"instructions": "1. Tap the Sign In button\n2. Enter test@example.com in the email field\n3. Enter password123 in the password field\n4. Tap the Login button\n5. Verify that the home screen appears with Welcome message",
"suite_id": "550e8400-e29b-41d4-a716-446655440000"
}'
Response Fields
Unique identifier (UUID) of the created flow
Natural language test instructions
Flow type (currently always single-prompt)
Whether caching is enabled for this flow
UUID of the suite this flow belongs to (if attached)
Position of this flow within the suite (0-indexed, if attached)
ISO 8601 timestamp of when the flow was created
Example Response
{
"id" : "660e8400-e29b-41d4-a716-446655440001" ,
"name" : "Login with valid credentials" ,
"instructions" : "1. Tap the Sign In button \n 2. Enter test@example.com in the email field \n 3. Enter password123 in the password field \n 4. Tap the Login button \n 5. Verify that the home screen appears with Welcome message" ,
"type" : "single-prompt" ,
"caching_enabled" : true ,
"suite_id" : "550e8400-e29b-41d4-a716-446655440000" ,
"position" : 0 ,
"created_at" : "2025-01-15T10:31:00Z"
}
Example Workflow
Here’s a typical workflow for creating a test suite with multiple test cases:
Create a Suite
First, create a suite to organize your test cases. If your app requires login, include auth_instructions — these run automatically before each flow: curl -X POST https://backend.autosana.ai/api/v1/suites \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Login Feature Tests",
"auth_instructions": "Tap Sign In\nEnter ${env:USERNAME}\nEnter ${env:PASSWORD}\nTap Submit"
}'
Save the returned id for the next step.
Create Flows
Create test flows and attach them to the suite: # Positive test case
curl -X POST https://backend.autosana.ai/api/v1/flows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Login with valid credentials",
"instructions": "Enter valid email and password, tap login, verify home screen appears",
"suite_id": "SUITE_ID_FROM_STEP_1"
}'
# Negative test case
curl -X POST https://backend.autosana.ai/api/v1/flows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Login with invalid password",
"instructions": "Enter valid email but wrong password, tap login, verify error message appears",
"suite_id": "SUITE_ID_FROM_STEP_1"
}'