Create an immutable test-plan version
POST
/v1/test-plans/{testPlanId}/versionsHow to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| testPlanId | path | string | Yes | — |
Query parameters
None.
Body schema
Content type: application/json · Optional
| Field | Type | Required | Description |
|---|---|---|---|
| label | string | No | — |
| description | string | No | Human-readable description. |
| snapshot | object | No | — |
| snapshot.name | string | No | Human-readable name. |
| snapshot.description | string | No | Human-readable description. |
| snapshot.status | draft | active | archived | No | Current lifecycle status. |
| snapshot.projectId | string | No | Project ID. |
| snapshot.targetType | project | workflow | function | web_app | agent | repository | custom | No | — |
| snapshot.targetId | string | No | — |
| snapshot.defaultEnvironmentId | string | No | — |
| snapshot.definition | object | No | — |
| snapshot.definition.schemaVersion | computer_agents_test_plan_v1 | Yes | — |
| snapshot.definition.setup | object | Yes | — |
| snapshot.definition.setup.command | string | Yes | — |
| snapshot.definition.setup.workingDirectory | string | Yes | — |
| snapshot.definition.setup.timeoutMs | integer | Yes | — |
| snapshot.definition.setup.env | object | Yes | — |
| snapshot.definition.setup.secretRefs | string[] | Yes | — |
| snapshot.definition.cases | object[] | Yes | — |
| snapshot.definition.cases[].id | string | Yes | Unique identifier. |
| snapshot.definition.cases[].name | string | Yes | Human-readable name. |
| snapshot.definition.cases[].description | string | Yes | Human-readable description. |
| snapshot.definition.cases[].kind | command | contract | integration | browser | agent | security | custom | Yes | — |
| snapshot.definition.cases[].command | string | Yes | — |
| snapshot.definition.cases[].workingDirectory | string | Yes | — |
| snapshot.definition.cases[].timeoutMs | integer | Yes | — |
| snapshot.definition.cases[].retries | integer | Yes | — |
| snapshot.definition.cases[].env | object | Yes | — |
| snapshot.definition.cases[].secretRefs | string[] | Yes | — |
| snapshot.definition.cases[].request | object | Yes | Kind-specific structured request. Secrets must be referenced through `secretRefs`. |
| snapshot.definition.cases[].assertions | object[] | Yes | — |
| snapshot.definition.cases[].agentId | string | Yes | Agent ID. |
| snapshot.definition.cases[].enabled | boolean | Yes | — |
| snapshot.definition.cases[].tags | string[] | Yes | — |
| snapshot.definition.teardown | object | Yes | — |
| snapshot.definition.teardown.command | string | Yes | — |
| snapshot.definition.teardown.workingDirectory | string | Yes | — |
| snapshot.definition.teardown.timeoutMs | integer | Yes | — |
| snapshot.definition.teardown.env | object | Yes | — |
| snapshot.definition.teardown.secretRefs | string[] | Yes | — |
| snapshot.definition.concurrency | integer | Yes | — |
| snapshot.definition.stopOnFailure | boolean | Yes | — |
| snapshot.definition.retryPolicy | object | Yes | — |
| snapshot.definition.retryPolicy.maxAttempts | integer | Yes | — |
| snapshot.definition.retryPolicy.backoffMs | integer | Yes | — |
| snapshot.definition.evidencePolicy | object | Yes | — |
| snapshot.definition.evidencePolicy.retainLogs | boolean | Yes | — |
| snapshot.definition.evidencePolicy.retainScreenshots | boolean | Yes | — |
| snapshot.definition.evidencePolicy.retainTraces | boolean | Yes | — |
| snapshot.definition.evidencePolicy.retainArtifacts | boolean | Yes | — |
| snapshot.definition.evidencePolicy.redactSecrets | boolean | Yes | — |
| snapshot.metadata | object | No | Free-form metadata object. |
| metadata | object | No | Free-form metadata object. |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
201Saved test-plan versionapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| version | object | Yes | — |
| version.id | string | Yes | Unique identifier. |
| version.testPlanId | string | Yes | — |
| version.version | integer | Yes | — |
| version.label | string | Yes | — |
| version.description | string | Yes | Human-readable description. |
| version.status | saved | published | Yes | Current lifecycle status. |
| version.snapshot | object | Yes | — |
| version.snapshot.name | string | Yes | Human-readable name. |
| version.snapshot.description | string | Yes | Human-readable description. |
| version.snapshot.status | draft | active | archived | Yes | Current lifecycle status. |
| version.snapshot.projectId | string | Yes | Project ID. |
| version.snapshot.targetType | project | workflow | function | web_app | agent | repository | custom | Yes | — |
| version.snapshot.targetId | string | Yes | — |
| version.snapshot.defaultEnvironmentId | string | Yes | — |
| version.snapshot.definition | object | Yes | — |
| version.snapshot.definition.schemaVersion | computer_agents_test_plan_v1 | Yes | — |
| version.snapshot.definition.setup | object | Yes | — |
| version.snapshot.definition.setup.command | string | Yes | — |
| version.snapshot.definition.setup.workingDirectory | string | Yes | — |
| version.snapshot.definition.setup.timeoutMs | integer | Yes | — |
| version.snapshot.definition.setup.env | object | Yes | — |
| version.snapshot.definition.setup.secretRefs | string[] | Yes | — |
| version.snapshot.definition.cases | object[] | Yes | — |
| version.snapshot.definition.cases[].id | string | Yes | Unique identifier. |
| version.snapshot.definition.cases[].name | string | Yes | Human-readable name. |
| version.snapshot.definition.cases[].description | string | Yes | Human-readable description. |
| version.snapshot.definition.cases[].kind | command | contract | integration | browser | agent | security | custom | Yes | — |
| version.snapshot.definition.cases[].command | string | Yes | — |
| version.snapshot.definition.cases[].workingDirectory | string | Yes | — |
| version.snapshot.definition.cases[].timeoutMs | integer | Yes | — |
| version.snapshot.definition.cases[].retries | integer | Yes | — |
| version.snapshot.definition.cases[].env | object | Yes | — |
| version.snapshot.definition.cases[].secretRefs | string[] | Yes | — |
| version.snapshot.definition.cases[].request | object | Yes | Kind-specific structured request. Secrets must be referenced through `secretRefs`. |
| version.snapshot.definition.cases[].assertions | object[] | Yes | — |
| version.snapshot.definition.cases[].agentId | string | Yes | Agent ID. |
| version.snapshot.definition.cases[].enabled | boolean | Yes | — |
| version.snapshot.definition.cases[].tags | string[] | Yes | — |
| version.snapshot.definition.teardown | object | Yes | — |
| version.snapshot.definition.teardown.command | string | Yes | — |
| version.snapshot.definition.teardown.workingDirectory | string | Yes | — |
| version.snapshot.definition.teardown.timeoutMs | integer | Yes | — |
| version.snapshot.definition.teardown.env | object | Yes | — |
| version.snapshot.definition.teardown.secretRefs | string[] | Yes | — |
| version.snapshot.definition.concurrency | integer | Yes | — |
| version.snapshot.definition.stopOnFailure | boolean | Yes | — |
| version.snapshot.definition.retryPolicy | object | Yes | — |
| version.snapshot.definition.retryPolicy.maxAttempts | integer | Yes | — |
| version.snapshot.definition.retryPolicy.backoffMs | integer | Yes | — |
| version.snapshot.definition.evidencePolicy | object | Yes | — |
| version.snapshot.definition.evidencePolicy.retainLogs | boolean | Yes | — |
| version.snapshot.definition.evidencePolicy.retainScreenshots | boolean | Yes | — |
| version.snapshot.definition.evidencePolicy.retainTraces | boolean | Yes | — |
| version.snapshot.definition.evidencePolicy.retainArtifacts | boolean | Yes | — |
| version.snapshot.definition.evidencePolicy.redactSecrets | boolean | Yes | — |
| version.snapshot.metadata | object | Yes | Functional extension metadata only; ownership and access-control fields are deliberately excluded. |
| version.metadata | object | Yes | Free-form metadata object. |
| version.publishedAt | string | Yes | — |
| version.createdAt | string | Yes | ISO 8601 timestamp. |
| version.updatedAt | string | Yes | ISO 8601 timestamp. |
Create an immutable test-plan version
Loading...
Response 201
Loading...