> For the complete documentation index, see [llms.txt](https://help.aximo.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aximo.autify.com/api-reference/test-plans.md).

# Test Plans

Create test plans and manage the cases they contain.

## List test plans

> Lists a workspace's test plans, most recently updated first, with case\
> counts. Use \`GET /api/plans/{planId}\` for a plan's full detail\
> including its ordered cases. \`apiEnabled\` indicates whether the plan\
> can be triggered through \`POST /api/triggers/plans/{planId}/run\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"PlanListItem":{"type":"object","required":["id","projectId","title","apiEnabled","caseCount","hasMobileCases","createdAt","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"apiEnabled":{"type":"boolean","description":"Whether the plan can be triggered through the API."},"caseCount":{"type":"integer"},"hasMobileCases":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans":{"get":{"operationId":"listPlans","summary":"List test plans","description":"Lists a workspace's test plans, most recently updated first, with case\ncounts. Use `GET /api/plans/{planId}` for a plan's full detail\nincluding its ordered cases. `apiEnabled` indicates whether the plan\ncan be triggered through `POST /api/triggers/plans/{planId}/run`.\n","tags":["Test Plans"],"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","format":"uuid"},"description":"UUID of the workspace (project) to list plans for."},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Case-insensitive substring match on title and description."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Plans for the workspace, most recently updated first.","content":{"application/json":{"schema":{"type":"object","required":["items","totalCount","page","pageSize","totalPages"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlanListItem"}},"totalCount":{"type":"integer"},"page":{"type":"integer"},"pageSize":{"type":"integer"},"totalPages":{"type":"integer"}}}}}},"400":{"description":"Invalid query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Create a test plan

> Creates an empty test plan in a workspace. Add cases with\
> \`POST /api/plans/{planId}/cases\`, then trigger it with\
> \`POST /api/triggers/plans/{planId}/run\`. Plans created via the API have\
> \*\*API access enabled by default\*\*.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans":{"post":{"operationId":"createPlan","summary":"Create a test plan","description":"Creates an empty test plan in a workspace. Add cases with\n`POST /api/plans/{planId}/cases`, then trigger it with\n`POST /api/triggers/plans/{planId}/run`. Plans created via the API have\n**API access enabled by default**.\n","tags":["Test Plans"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["projectId","title"],"properties":{"projectId":{"type":"string","format":"uuid","description":"ID of the workspace to create the plan in."},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string"}}}}}},"responses":{"201":{"description":"Plan created.","content":{"application/json":{"schema":{"type":"object","required":["success","planId"],"properties":{"success":{"type":"boolean"},"planId":{"type":"string","format":"uuid"}}}}}},"400":{"description":"Invalid request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Get a test plan

> Returns a plan's full detail: settings, plan variables (secret values\
> are masked as \`\*\*\*\` and flagged with \`isSecret\`), and its cases in\
> execution order.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"PlanDetail":{"type":"object","required":["id","projectId","title","apiEnabled","executionMode","stopOnFailure","variables","caseCount","createdAt","updatedAt","cases"],"properties":{"id":{"type":"string","format":"uuid"},"projectId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"apiEnabled":{"type":"boolean","description":"Whether the plan can be triggered through the API."},"executionMode":{"type":"string","enum":["parallel","sequential"]},"stopOnFailure":{"type":"boolean"},"variables":{"type":"array","description":"Plan variables. Secret values are always masked as `***`.","items":{"type":"object","required":["name","value","isSecret"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"isSecret":{"type":"boolean"}}}},"caseCount":{"type":"integer"},"archivedAt":{"type":"string","format":"date-time","nullable":true,"description":"Set when the plan was archived (soft-deleted). Archived plans are excluded from lists but stay readable by id."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string"}}},"project":{"type":"object","nullable":true,"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"cases":{"type":"array","description":"The plan's cases in execution order.","items":{"type":"object","required":["id","order","type","title"],"properties":{"id":{"type":"string","format":"uuid"},"order":{"type":"integer"},"type":{"type":"string","enum":["web","mobile","desktop","multi_device"]},"title":{"type":"string","nullable":true},"lastStatus":{"type":"string","nullable":true}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans/{planId}":{"get":{"operationId":"getPlan","summary":"Get a test plan","description":"Returns a plan's full detail: settings, plan variables (secret values\nare masked as `***` and flagged with `isSecret`), and its cases in\nexecution order.\n","tags":["Test Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Plan detail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanDetail"}}}},"400":{"description":"Invalid plan id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test plan not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Update a test plan

> Updates the provided fields of a test plan; omitted fields are left\
> unchanged. At least one field is required.\
> \
> \`executionMode\` sets the plan's stored Execution setting: \`parallel\`\
> runs cases concurrently up to the organization's concurrency limit,\
> \`sequential\` runs one case at a time in plan order. \`stopOnFailure\`\
> only takes effect on sequential runs.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans/{planId}":{"patch":{"operationId":"updatePlan","summary":"Update a test plan","description":"Updates the provided fields of a test plan; omitted fields are left\nunchanged. At least one field is required.\n\n`executionMode` sets the plan's stored Execution setting: `parallel`\nruns cases concurrently up to the organization's concurrency limit,\n`sequential` runs one case at a time in plan order. `stopOnFailure`\nonly takes effect on sequential runs.\n","tags":["Test Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"title":{"type":"string","maxLength":500},"description":{"type":"string"},"executionMode":{"type":"string","enum":["parallel","sequential"]},"stopOnFailure":{"type":"boolean","description":"Stop remaining cases after a failure. Sequential runs only."}}}}}},"responses":{"200":{"description":"Plan updated.","content":{"application/json":{"schema":{"type":"object","required":["success","plan"],"properties":{"success":{"type":"boolean"},"plan":{"type":"object","required":["id","title","executionMode","stopOnFailure","updatedAt"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"executionMode":{"type":"string","enum":["parallel","sequential"]},"stopOnFailure":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Invalid request body or plan ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test plan not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Archive a test plan

> Archives (soft-deletes) a test plan. The plan is hidden from plan lists\
> and can no longer be updated or run, and its schedule is disabled, but\
> its member cases and run history are kept and the plan stays readable by\
> id with \`archivedAt\` set. Idempotent: archiving an already-archived plan\
> succeeds.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans/{planId}/archive":{"post":{"operationId":"archivePlan","summary":"Archive a test plan","description":"Archives (soft-deletes) a test plan. The plan is hidden from plan lists\nand can no longer be updated or run, and its schedule is disabled, but\nits member cases and run history are kept and the plan stays readable by\nid with `archivedAt` set. Idempotent: archiving an already-archived plan\nsucceeds.\n","tags":["Test Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Plan archived.","content":{"application/json":{"schema":{"type":"object","required":["archived"],"properties":{"archived":{"type":"boolean"}}}}}},"400":{"description":"Invalid plan ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Test plan not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Add a case to a plan

> Appends a test case to the end of a plan. The case must belong to the same\
> workspace as the plan.<br>

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans/{planId}/cases":{"post":{"operationId":"addCaseToPlan","summary":"Add a case to a plan","description":"Appends a test case to the end of a plan. The case must belong to the same\nworkspace as the plan.\n","tags":["Test Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["caseId"],"properties":{"caseId":{"type":"string","format":"uuid","description":"ID of the case to add."}}}}}},"responses":{"201":{"description":"Case added to the plan.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Invalid plan ID or request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Plan not found, or case not found in the same workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Case is already in the plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```

## Remove a case from a plan

> Removes a test case from a plan. Idempotent.

```json
{"openapi":"3.0.3","info":{"title":"Aximo API","version":"1.0.0"},"tags":[{"name":"Test Plans","description":"Create test plans and manage the cases they contain."}],"servers":[{"url":"/","description":"Current environment"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Organization API key generated from Settings → API Keys."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded — e.g. the daily session limit was reached for the\norganization, or too many API requests were sent in a short window\n(retry after the number of seconds in the `Retry-After` header).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/plans/{planId}/cases/{caseId}":{"delete":{"operationId":"removeCaseFromPlan","summary":"Remove a case from a plan","description":"Removes a test case from a plan. Idempotent.","tags":["Test Plans"],"parameters":[{"name":"planId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Case removed from the plan.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Invalid plan or case ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Plan not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}}}}
```
